From: Neal H. Walfield Date: Sat, 5 Nov 2011 11:20:53 +0000 (+0100) Subject: When parsing a feed update: don't die if the version field is unset. X-Git-Url: https://vcs.maemo.org/git/?a=commitdiff_plain;h=ace987cc270047087b61fdefbfd5fff5156ab5c5;hp=eb13842e12298d9419fa4a125bb8ff0899d3a57b;p=feedingit When parsing a feed update: don't die if the version field is unset. --- diff --git a/src/rss_sqlite.py b/src/rss_sqlite.py index ed6ac3b..c388617 100644 --- a/src/rss_sqlite.py +++ b/src/rss_sqlite.py @@ -392,13 +392,13 @@ class Feed(BaseObject): logger.debug("%s: No changes to feed." % (self.key,)) mainthread.execute(wc_success, async=True) success = True - elif len(tmp["entries"])==0 and not tmp.version: + elif len(tmp["entries"])==0 and not tmp.get('version', None): # An error occured fetching or parsing the feed. (Version # will be either None if e.g. the connection timed our or # '' if the data is not a proper feed) logger.error( "Error fetching %s: version is: %s: error: %s" - % (url, str (tmp.version), + % (url, str (tmp.get('version', 'unset')), str (tmp.get ('bozo_exception', 'Unknown error')))) logger.debug(tmp) def register_stream_update_failed(http_status):