From a8ac86b758442f57a87c17d0faf790a6603ffc98 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 7 Sep 2021 20:33:27 +0100 Subject: [PATCH] Showing warning about date format --- newswire.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/newswire.py b/newswire.py index 2aae4b087..607f9cd2e 100644 --- a/newswire.py +++ b/newswire.py @@ -220,8 +220,6 @@ def parseFeedDate(pubDate: str) -> str: publishedDate = \ datetime.strptime(pubDate, dateFormat) except BaseException: - print('WARN: unrecognized date format: ' + - pubDate + ' ' + dateFormat) continue if publishedDate: @@ -240,6 +238,8 @@ def parseFeedDate(pubDate: str) -> str: pubDateStr = str(publishedDate) if not pubDateStr.endswith('+00:00'): pubDateStr += '+00:00' + else: + print('WARN: unrecognized date format: ' + pubDate) return pubDateStr