# HG changeset patch # User dirk # Date 1315929156 -7200 # Node ID 2f2016a10f7d6f1a9f82a49095eddfa22eb0828c # Parent 6cbd4420c187ca39146a3dac0f5d5126a5d35bc6 handle a missing updated_parsed attribute in a feed entry gracefully diff -r 6cbd4420c187 -r 2f2016a10f7d backend/AbstractFeedUpdater.py --- a/backend/AbstractFeedUpdater.py Tue Sep 13 17:43:22 2011 +0200 +++ b/backend/AbstractFeedUpdater.py Tue Sep 13 17:52:36 2011 +0200 @@ -48,7 +48,8 @@ def _normalize(self, entry): if not hasattr(entry, "id"): entry.id = entry.link - if not hasattr(entry, "updated_parsed"): + if not hasattr(entry, "updated_parsed") or entry.updated_parsed is None: + # TODO try to parse the entry.updated date string entry.updated_parsed = datetime.today() else: entry.updated_parsed = datetime(*entry.updated_parsed[:6])