[Mpuls-commits] r3209 - in base/trunk: . mpulsweb/lib
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Tue Jul 20 19:48:34 CEST 2010
Author: bh
Date: 2010-07-20 19:48:33 +0200 (Tue, 20 Jul 2010)
New Revision: 3209
Modified:
base/trunk/ChangeLog
base/trunk/mpulsweb/lib/db.py
Log:
* mpulsweb/lib/db.py (PostgresDBInterface.releaseCursor): This
method may be called with None as the cursor. Handle that case.
Modified: base/trunk/ChangeLog
===================================================================
--- base/trunk/ChangeLog 2010-07-20 17:43:57 UTC (rev 3208)
+++ base/trunk/ChangeLog 2010-07-20 17:48:33 UTC (rev 3209)
@@ -1,5 +1,10 @@
2010-07-20 Bernhard Herzog <bh at intevation.de>
+ * mpulsweb/lib/db.py (PostgresDBInterface.releaseCursor): This
+ method may be called with None as the cursor. Handle that case.
+
+2010-07-20 Bernhard Herzog <bh at intevation.de>
+
* mpulsweb/lib/renderer.py: Remove unused code and commented out
code
Modified: base/trunk/mpulsweb/lib/db.py
===================================================================
--- base/trunk/mpulsweb/lib/db.py 2010-07-20 17:43:57 UTC (rev 3208)
+++ base/trunk/mpulsweb/lib/db.py 2010-07-20 17:48:33 UTC (rev 3209)
@@ -148,7 +148,10 @@
return conn.cursor()
def releaseCursor(self, cursor):
- conn = cursor.connection
+ if cursor is not None:
+ conn = cursor.connection
+ else:
+ conn = None
db.recycleConnection(conn, cursor)
# vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8:
More information about the Mpuls-commits
mailing list