diff idavoll/pgsql_storage.py @ 142:812300cdbc22

Changed behaviour of retraction of items so that only the actually deleted item ids are returned, and no exception is raised for items that didn't actually exists.
author Ralph Meijer <ralphm@ik.nu>
date Tue, 12 Jul 2005 09:23:00 +0000
parents 327de183f48d
children f393bccec4bc
line wrap: on
line diff
--- a/idavoll/pgsql_storage.py	Tue Jun 14 12:12:23 2005 +0000
+++ b/idavoll/pgsql_storage.py	Tue Jul 12 09:23:00 2005 +0000
@@ -329,8 +329,10 @@
                            (self.id,
                             item_id))
 
-            if not cursor.rowcount:
-                raise storage.ItemNotFound
+            if cursor.rowcount:
+                deleted.append(item_id)
+
+        return deleted
 
     def get_items(self, max_items=None):
         return self._dbpool.runInteraction(self._get_items, max_items)