forked from indymedia/epicyon
Exception warn when converting date
parent
4fdecc4f30
commit
fda4e294f8
|
@ -348,7 +348,8 @@ def getRSSfromDict(baseDir: str, newswire: {},
|
||||||
published = publishedWithOffset.strftime("%Y-%m-%dT%H:%M:%SZ")
|
published = publishedWithOffset.strftime("%Y-%m-%dT%H:%M:%SZ")
|
||||||
try:
|
try:
|
||||||
pubDate = datetime.strptime(published, "%Y-%m-%dT%H:%M:%SZ")
|
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
|
continue
|
||||||
rssStr += '<item>\n'
|
rssStr += '<item>\n'
|
||||||
rssStr += ' <title>' + fields[0] + '</title>\n'
|
rssStr += ' <title>' + fields[0] + '</title>\n'
|
||||||
|
|
Loading…
Reference in New Issue