From 70d58b98891ba0d80e8d5fd6072247270cc5b960 Mon Sep 17 00:00:00 2001 From: Denis Lehmann Date: Tue, 14 Apr 2020 23:22:45 +0200 Subject: [PATCH] change error handling --- spiderss.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spiderss.py b/spiderss.py index 3371ced..503ca42 100755 --- a/spiderss.py +++ b/spiderss.py @@ -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