[Mpuls-commits] r5383 - base/trunk/mpulsweb/lib

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Wed Sep 21 15:55:23 CEST 2011


Author: bh
Date: 2011-09-21 15:55:23 +0200 (Wed, 21 Sep 2011)
New Revision: 5383

Modified:
   base/trunk/mpulsweb/lib/db.py
Log:
Call the recycleConnection method on the correct object in DB.execute.
The correct object is obviously self, not the global db, since the
connection is created with self.getConnection(). However, using db
probably isn't a problem in most cases, because the execute method is
usually called on the global db object in which case self and db are
effectively the same object.


Modified: base/trunk/mpulsweb/lib/db.py
===================================================================
--- base/trunk/mpulsweb/lib/db.py	2011-09-21 07:40:32 UTC (rev 5382)
+++ base/trunk/mpulsweb/lib/db.py	2011-09-21 13:55:23 UTC (rev 5383)
@@ -143,7 +143,7 @@
         finally:
             if not has_commited and con is not None:
                 con.rollback()
-            db.recycleConnection(con, cur)
+            self.recycleConnection(con, cur)
 
 
 class PostgresDBInterface(FormEdDBInterface):



More information about the Mpuls-commits mailing list