comparison FeedUpdater.py @ 45:0604e374c1d6

pass session when creating a new feed
author Dirk Olmes <dirk@xanthippe.ping.de>
date Fri, 14 May 2010 15:24:51 +0200
parents aaec263f07ca
children 4b0d686493fb
comparison
equal deleted inserted replaced
44:be990ac6e478 45:0604e374c1d6
25 title = result["feed"].title 25 title = result["feed"].title
26 newFeed = Feed(title, url) 26 newFeed = Feed(title, url)
27 session.add(newFeed) 27 session.add(newFeed)
28 session.commit() 28 session.commit()
29 29
30 FeedUpdater(newFeed).update() 30 FeedUpdater(session, newFeed).update()
31 session.commit() 31 session.commit()
32 32
33 class FeedUpdater(object): 33 class FeedUpdater(object):
34 def __init__(self, session, feed): 34 def __init__(self, session, feed):
35 self.session = session 35 self.session = session