changeset 113:8135eeb9ab9a

fs2: add some missing close() calls for ResultProxies
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sun, 13 Mar 2011 03:07:38 +0100
parents 1efaef3eec9c
children f436f37cff0d
files MoinMoin/storage/backends/fs2.py
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/storage/backends/fs2.py	Sat Mar 12 23:42:08 2011 +0100
+++ b/MoinMoin/storage/backends/fs2.py	Sun Mar 13 03:07:38 2011 +0100
@@ -253,6 +253,7 @@
         name2id = self._name2id
         try:
             results = name2id.update().where(name2id.c.item_id==item_id).values(item_name=newname).execute()
+            results.close()
         except IntegrityError:
             raise ItemAlreadyExistsError("Target item '%r' already exists!" % newname)
 
@@ -271,6 +272,7 @@
         name2id = self._name2id
         try:
             results = name2id.insert().values(item_id=item_id, item_name=item_name).execute()
+            results.close()
         except IntegrityError:
             raise ItemAlreadyExistsError("Item '%r' already exists!" % item_name)
 
@@ -352,6 +354,7 @@
 
         name2id = self._name2id
         results = name2id.delete().where(name2id.c.item_id==item_id).execute()
+        results.close()
 
         path = self._make_path('meta', item_id)
         try: