Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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...
commit fa7120bda926e24fb747a8b50abbd00845920cb4 1 parent 01649c1
Jack Miller authored

Showing 1 changed file with 8 additions and 7 deletions. Show diff stats Hide diff stats

  1. +8 7 canto_next/feed.py
15 canto_next/feed.py
@@ -213,13 +213,14 @@ def set_attributes(self, items, attributes):
213 213 def index(self):
214 214
215 215 if not self.update_contents:
216   - try:
217   - if not self.items and self.URL in self.shelf:
218   - self.update_contents = self.shelf[self.URL]
219   - else:
220   - return
221   - except:
222   - pass
  216 + if not self.items and self.URL in self.shelf:
  217 + self.update_contents = self.shelf[self.URL]
  218 +
  219 + # If we got nothing, and there's not anything already resident, at
  220 + # least stub it in the shelf.
  221 +
  222 + else:
  223 + self.update_contents = {"entries" : []}
223 224
224 225 if self.URL not in self.shelf:
225 226 # Stub empty feed

0 comments on commit fa7120b

Please sign in to comment.
Something went wrong with that request. Please try again.