Mercurial > hg > Feedworm
changeset 101:b2a51c24f209
Provide a better error message if updating a feed fails.
author | Dirk Olmes <dirk@xanthippe.ping.de> |
---|---|
date | Tue, 15 Feb 2011 03:40:26 +0100 |
parents | 99807963d9e0 |
children | 25fef7c29c5b |
files | FeedUpdater.py |
diffstat | 1 files changed, 6 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/FeedUpdater.py Mon Feb 14 20:51:03 2011 +0100 +++ b/FeedUpdater.py Tue Feb 15 03:40:26 2011 +0100 @@ -58,10 +58,12 @@ def getFeed(self): result = feedparser.parse(self.feed.rss_url) - if result["bozo"] > 0: - raise FeedUpdateException() - if result["status"] >= STATUS_ERROR: - raise FeedUpdateException() + # bozo flags if a feed is well-formed. +# if result["bozo"] > 0: +# raise FeedUpdateException() + status = result["status"] + if status >= STATUS_ERROR: + raise FeedUpdateException("HTTP status " + str(status)) return result def processEntry(self, entry):