Mercurial > hg > Feedworm
comparison 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 |
comparison
equal
deleted
inserted
replaced
201:50b578588405 | 202:95445513cc34 |
---|---|
14 feedEntry = FeedEntry.findByLink(entry.link, self.database) | 14 feedEntry = FeedEntry.findByLink(entry.link, self.database) |
15 if feedEntry is None: | 15 if feedEntry is None: |
16 self._createFeedEntry(entry) | 16 self._createFeedEntry(entry) |
17 | 17 |
18 def _createFeedEntry(self, entry): | 18 def _createFeedEntry(self, entry): |
19 log.info("new feed entry: %s (%s)" % (entry.title, entry.published)) | 19 if hasattr(entry, "published"): |
20 log.info("new feed entry: %s (%s)" % (entry.title, entry.published)) | |
21 else: | |
22 log.info("new feed entry: %s" % (entry.title)) | |
20 feedEntry = FeedEntry() | 23 feedEntry = FeedEntry() |
21 feedEntry.feed = self.feed.id | 24 feedEntry.feed = self.feed.id |
22 feedEntry.link = entry.link | 25 feedEntry.link = entry.link |
23 feedEntry.title = entry.title | 26 feedEntry.title = entry.title |
24 feedEntry.summary = entry.summary | 27 feedEntry.summary = entry.summary |