diff backend/couchdb/FeedUpdater.py @ 202:95445513cc34

adjust logging if feed entry does not have a published date
author dirk
date Sun, 26 Feb 2012 10:37:41 +0100
parents a9ba3e3a9a9a
children bb3c851b18b1
line wrap: on
line diff
--- a/backend/couchdb/FeedUpdater.py	Wed Feb 01 01:26:09 2012 +0100
+++ b/backend/couchdb/FeedUpdater.py	Sun Feb 26 10:37:41 2012 +0100
@@ -16,7 +16,10 @@
             self._createFeedEntry(entry)
 
     def _createFeedEntry(self, entry):
-        log.info("new feed entry: %s (%s)" % (entry.title, entry.published))
+        if hasattr(entry, "published"):
+            log.info("new feed entry: %s (%s)" % (entry.title, entry.published))
+        else:
+            log.info("new feed entry: %s" % (entry.title))
         feedEntry = FeedEntry()
         feedEntry.feed = self.feed.id
         feedEntry.link = entry.link