handle feedparser.parse exceptions
This commit is contained in:
parent
7fdc9707d7
commit
08d910bbe7
1 changed files with 9 additions and 1 deletions
|
@ -791,7 +791,15 @@ class FeedTree(Gtk.TreeView):
|
|||
if msg.response_headers.get_one('Last-Modified'):
|
||||
entry['lastmodified'] = msg.response_headers.get_one('Last-Modified')
|
||||
|
||||
try:
|
||||
feed = feedparser.parse(msg.response_body.flatten().get_data())
|
||||
except:
|
||||
print "error parsing feed:"
|
||||
print msg.response_body.flatten().get_data()
|
||||
error_icon = self.render_icon(Gtk.STOCK_DIALOG_ERROR, Gtk.IconSize.MENU, None)
|
||||
self.model.set_value(it, 2, error_icon)
|
||||
self.update_feed_done(feedurl)
|
||||
return
|
||||
|
||||
if feed.bozo != 0:
|
||||
# retrieved data was no valid feed
|
||||
|
|
Loading…
Reference in a new issue