From e17092168edaeceff8b54780266d5c32a9715a7e Mon Sep 17 00:00:00 2001 From: mampfes Date: Sat, 24 Dec 2022 11:01:34 +0100 Subject: [PATCH] log as info, not as warning: derby_gov_uk --- .../waste_collection_schedule/source/derby_gov_uk.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/custom_components/waste_collection_schedule/waste_collection_schedule/source/derby_gov_uk.py b/custom_components/waste_collection_schedule/waste_collection_schedule/source/derby_gov_uk.py index 897ac858f..e82f1b295 100644 --- a/custom_components/waste_collection_schedule/waste_collection_schedule/source/derby_gov_uk.py +++ b/custom_components/waste_collection_schedule/waste_collection_schedule/source/derby_gov_uk.py @@ -1,11 +1,10 @@ +import logging from datetime import datetime +from urllib.parse import parse_qs, urlsplit import requests -from waste_collection_schedule import Collection # type: ignore[attr-defined] - from bs4 import BeautifulSoup -from urllib.parse import urlsplit, parse_qs -import logging +from waste_collection_schedule import Collection # type: ignore[attr-defined] TITLE = "Derby.gov.uk" DESCRIPTION = "Source for Derby.gov.uk services for Derby City Council, UK." @@ -75,7 +74,7 @@ def fetch(self): try: date = datetime.strptime(date.text, "%A, %d %B %Y:").date() except ValueError: - _LOGGER.error(f"Skipped {date} as it does not match time format") + _LOGGER.info(f"Skipped {date} as it does not match time format") continue img_tag = result.find("img") collection_type = img_tag["alt"]