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

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Fri Jul 2 18:10:28 CEST 2010


Author: bh
Date: 2010-07-02 18:10:26 +0200 (Fri, 02 Jul 2010)
New Revision: 3118

Modified:
   base/trunk/ChangeLog
   base/trunk/mpulsweb/model/case.py
Log:
* mpulsweb/model/case.py (MpulsCase.setEditor): Use log.exception
properly and add a log message.


Modified: base/trunk/ChangeLog
===================================================================
--- base/trunk/ChangeLog	2010-07-02 12:53:30 UTC (rev 3117)
+++ base/trunk/ChangeLog	2010-07-02 16:10:26 UTC (rev 3118)
@@ -1,5 +1,10 @@
 2010-07-02  Bernhard Herzog  <bh at intevation.de>
 
+	* mpulsweb/model/case.py (MpulsCase.setEditor): Use log.exception
+	properly and add a log message.
+
+2010-07-02  Bernhard Herzog  <bh at intevation.de>
+
 	* mpulsweb/controllers/formularpage.py: Remove an except clause
 	that only logs the exception and then reraises it.  Logging should
 	already be handled by the pylons system in some way, so there's no

Modified: base/trunk/mpulsweb/model/case.py
===================================================================
--- base/trunk/mpulsweb/model/case.py	2010-07-02 12:53:30 UTC (rev 3117)
+++ base/trunk/mpulsweb/model/case.py	2010-07-02 16:10:26 UTC (rev 3118)
@@ -852,8 +852,9 @@
         try:
             cur.execute(SET_EDITOR_SQL, fields)
             con.commit()
-        except Exception, e:
-            log.exception(e)
+        except Exception:
+            log.exception("Error setting editor of case %r to %r"
+                          % (self.id, userid))
             con.rollback()
         finally:
             db.recycleConnection(con, cur)



More information about the Mpuls-commits mailing list