# HG changeset patch # User Dirk Olmes # Date 1297737626 -3600 # Node ID b2a51c24f209ea1bf37cdb0052ec3306be2d5696 # Parent 99807963d9e0a9a8d3a4041e5e9bc7091f2ec8fc Provide a better error message if updating a feed fails. diff -r 99807963d9e0 -r b2a51c24f209 FeedUpdater.py --- 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):