[Mpuls-commits] r3961 - in base/trunk: . mpulsweb/model

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Mon Oct 11 15:38:23 CEST 2010


Author: bh
Date: 2010-10-11 15:38:22 +0200 (Mon, 11 Oct 2010)
New Revision: 3961

Modified:
   base/trunk/ChangeLog
   base/trunk/mpulsweb/model/news.py
Log:
* mpulsweb/model/news.py (NewsList.__init__): Make sure the local
variables conn and cur are set in case connecting to the database
fails for some reason.


Modified: base/trunk/ChangeLog
===================================================================
--- base/trunk/ChangeLog	2010-10-11 11:59:29 UTC (rev 3960)
+++ base/trunk/ChangeLog	2010-10-11 13:38:22 UTC (rev 3961)
@@ -1,3 +1,9 @@
+2010-10-11  Bernhard Herzog  <bh at intevation.de>
+
+	* mpulsweb/model/news.py (NewsList.__init__): Make sure the local
+	variables conn and cur are set in case connecting to the database
+	fails for some reason.
+
 2010-10-11  Roland Geider <roland.geider at intevation.de>
 
 	* mpulsweb/lib/renderer.py,

Modified: base/trunk/mpulsweb/model/news.py
===================================================================
--- base/trunk/mpulsweb/model/news.py	2010-10-11 11:59:29 UTC (rev 3960)
+++ base/trunk/mpulsweb/model/news.py	2010-10-11 13:38:22 UTC (rev 3961)
@@ -57,6 +57,7 @@
     def __init__(self, user):
         self.list = []
         factory = NewsFactory()
+        conn = cur = None
         try:
             conn = db.getConnection()
             cur = conn.cursor()



More information about the Mpuls-commits mailing list