diff FeedUpdater.py @ 50:4b0d686493fb

better error handling while adding feeds: data is only saved if a feed could be created and entries could be retrieved. MainWindow displays feedback in the status bar if an exception occurred while adding a feed.
author Dirk Olmes <dirk@xanthippe.ping.de>
date Mon, 17 May 2010 04:30:55 +0200
parents 0604e374c1d6
children dcee24702dd7
line wrap: on
line diff
--- a/FeedUpdater.py	Mon May 17 03:52:13 2010 +0200
+++ b/FeedUpdater.py	Mon May 17 04:30:55 2010 +0200
@@ -25,10 +25,8 @@
     title = result["feed"].title
     newFeed = Feed(title, url)
     session.add(newFeed)
-    session.commit()
     
     FeedUpdater(session, newFeed).update()
-    session.commit()
 
 class FeedUpdater(object):
     def __init__(self, session, feed):