# HG changeset patch # User Dirk Olmes # Date 1272391701 -7200 # Node ID 01a86b178e6009d40f7bb3ddf359f68d4caf1d7b # Parent fd4c8bfa62d6ac09db4ebfa5e89d9ef9cfb83695 catch the FeedUpdateException that might be raised when updating a feed, print it and continue with next feed diff -r fd4c8bfa62d6 -r 01a86b178e60 FeedUpdater.py --- a/FeedUpdater.py Tue Apr 27 10:22:35 2010 +0200 +++ b/FeedUpdater.py Tue Apr 27 20:08:21 2010 +0200 @@ -9,7 +9,10 @@ def updateAllFeeds(session): allFeeds = session.query(Feed) for feed in allFeeds: - FeedUpdater(session, feed).update() + try: + FeedUpdater(session, feed).update() + except FeedUpdateException: + print("problems while updating feed " + feed.rss_url) session.commit() class FeedUpdater(object): @@ -44,4 +47,4 @@ self.session.add(new) class FeedUpdateException(Exception): - pass \ No newline at end of file + pass