Permalink
Browse files

Stub bugged/empty feeds with no previous items.

The feed objects still exist, so we need to be able to count on shelf
contents existing.

Signed-off-by: Jack Miller <jack@codezen.org>
  • Loading branch information...
1 parent 01649c1 commit fa7120bda926e24fb747a8b50abbd00845920cb4 @themoken committed Jul 19, 2012
Showing with 8 additions and 7 deletions.
  1. +8 −7 canto_next/feed.py
View
15 canto_next/feed.py
@@ -213,13 +213,14 @@ def set_attributes(self, items, attributes):
def index(self):
if not self.update_contents:
- try:
- if not self.items and self.URL in self.shelf:
- self.update_contents = self.shelf[self.URL]
- else:
- return
- except:
- pass
+ if not self.items and self.URL in self.shelf:
+ self.update_contents = self.shelf[self.URL]
+
+ # If we got nothing, and there's not anything already resident, at
+ # least stub it in the shelf.
+
+ else:
+ self.update_contents = {"entries" : []}
if self.URL not in self.shelf:
# Stub empty feed

0 comments on commit fa7120b

Please sign in to comment.