Exception warn when converting date

main
Bob Mottram 2020-10-20 13:28:15 +01:00
parent 4fdecc4f30
commit fda4e294f8
1 changed files with 2 additions and 1 deletions

View File

@ -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 += '<item>\n'
rssStr += ' <title>' + fields[0] + '</title>\n'