From fda4e294f8ac2bde69455e8b5600feb71419ab3c Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 20 Oct 2020 13:28:15 +0100 Subject: [PATCH] Exception warn when converting date --- newswire.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/newswire.py b/newswire.py index 303a9865..8edb475c 100644 --- a/newswire.py +++ b/newswire.py @@ -348,7 +348,8 @@ def getRSSfromDict(baseDir: str, newswire: {}, published = publishedWithOffset.strftime("%Y-%m-%dT%H:%M:%SZ") try: pubDate = datetime.strptime(published, "%Y-%m-%dT%H:%M:%SZ") - except BaseException: + except Exception as e: + print('WARN: Unable to convert date ' + published + ' ' + str(e)) continue rssStr += '\n' rssStr += ' ' + fields[0] + '\n'