Permalink
Browse files

Handle exceptions during parsing. Showed up when the domain of one of…

… our

aggregated blogs dropped off DNS... Oops.
  • Loading branch information...
mhagander committed Oct 27, 2008
1 parent af6da2f commit cdd608f9f91eb789a74a12927d7bea7f4b24f3d7
Showing with 5 additions and 1 deletion.
  1. +5 −1 aggregator.py
View
@@ -23,7 +23,11 @@ def Update(self):
feeds = self.db.cursor()
feeds.execute('SELECT id,feedurl,name,lastget FROM planet.feeds')
for feed in feeds.fetchall():
- self.ParseFeed(feed)
+ try:
+ self.ParseFeed(feed)
+ except Exception, e:
+ print "Exception when parsing feed '%s': %s" % (feed[1], e)
+
self.db.commit()
def ParseFeed(self, feedinfo):

0 comments on commit cdd608f

Please sign in to comment.