diff backend/sqlalchemy/Feed.py @ 167:a3c945ce434c

adjust the sqlalchemy backend to the changes in AbstractFeedUpdater
author dirk
date Mon, 05 Sep 2011 19:39:08 +0200
parents a4b2077c9603
children 7157bfd3f4d4
line wrap: on
line diff
--- a/backend/sqlalchemy/Feed.py	Sat Sep 03 04:12:35 2011 +0200
+++ b/backend/sqlalchemy/Feed.py	Mon Sep 05 19:39:08 2011 +0200
@@ -7,9 +7,9 @@
     def all(session):
         return session.query(Feed).order_by(Feed.title).all()
 
-    def __init__(self, title, rss_url):
+    def __init__(self, rss_url, title=None):
+        self.rss_url = rss_url
         self.title = title
-        self.rss_url = rss_url
         # default: update every 60 minutes
         self.update_interval = 60
         self.incrementNextUpdateDate()
@@ -44,7 +44,7 @@
     def markAllEntriesRead(self):
         for entry in self.entries:
             entry.markRead()
-            
-    def takeChangesFrom(self, dict):
-        for key in dict.keys():
-            setattr(self, key, dict[key])
+
+    def takeChangesFrom(self, changes):
+        for key in changes.keys():
+            setattr(self, key, changes[key])