From 8df0f3dd17b07a754011176ae055507215e80c5a Mon Sep 17 00:00:00 2001 From: Andreas Motl Date: Sat, 30 May 2020 15:50:27 +0200 Subject: [PATCH] Be compatible with "python-dateutil==2.8.0" because of Anaconda --- CHANGES.rst | 11 ++++++++--- dwdweather/core.py | 4 ++-- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 0ec1f66..c3b0cca 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,11 +1,16 @@ -#################### -dwdweather changelog -#################### +##################### +dwdweather2 changelog +##################### in progress =========== +2020-05-30 0.12.1 +================= +- Be compatible with ``python-dateutil==2.8.0``, which is still the + default release for all Anaconda installations. Thanks, @mmaelicke! + 2020-03-23 0.12.0 ================= - Improve error logging diff --git a/dwdweather/core.py b/dwdweather/core.py index ef96750..9f808fa 100644 --- a/dwdweather/core.py +++ b/dwdweather/core.py @@ -15,7 +15,7 @@ from tqdm import tqdm from copy import deepcopy from datetime import datetime -from dateutil.parser import parse as parsedate, ParserError +from dateutil.parser import parse as parsedate from dwdweather.client import DwdCdcClient from dwdweather.knowledge import DwdCdcKnowledge @@ -447,7 +447,7 @@ def import_measures_textfile(self, result): timestamp_datetime = parsedate(timestamp_sanitized, ignoretz=True) timestamp = int(timestamp_datetime.strftime(self.get_timestamp_format())) - except ParserError as ex: + except Exception as ex: log.error('Parsing timestamp "{}" failed: {}'.format(timestamp_sanitized, ex)) continue