change error handling

This commit is contained in:
Denis Lehmann 2020-04-14 23:22:45 +02:00
parent e5f90f79d1
commit 70d58b9889

View file

@ -125,8 +125,8 @@ def update_feed(feed):
text = get_article_text(a)
write_to_file(os.path.join(feedpath_new, filename), text)
log(' added article "{}"'.format(a.title))
except Exception as e:
error(' while parsing article "{}: {}"'.format(a.title, e))
except Exception as e:
error('while parsing feed article "{}" from feed "{}": {}'.format(a.title, feed['name'], e))
# Delete articles older than max_age