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

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


Author: bh
Date: 2010-07-02 18:31:01 +0200 (Fri, 02 Jul 2010)
New Revision: 3120

Modified:
   base/trunk/ChangeLog
   base/trunk/mpulsweb/model/case.py
Log:
* mpulsweb/model/case.py (MpulsCaseState.setState): Use
log.exception instead of printing a traceback directly to stderr.


Modified: base/trunk/ChangeLog
===================================================================
--- base/trunk/ChangeLog	2010-07-02 16:27:26 UTC (rev 3119)
+++ base/trunk/ChangeLog	2010-07-02 16:31:01 UTC (rev 3120)
@@ -1,5 +1,10 @@
 2010-07-02  Bernhard Herzog  <bh at intevation.de>
 
+	* mpulsweb/model/case.py (MpulsCaseState.setState): Use
+	log.exception instead of printing a traceback directly to stderr.
+
+2010-07-02  Bernhard Herzog  <bh at intevation.de>
+
 	* mpulsweb/model/case.py (MpulsCase.delete): Use log.exception
 	properly and add a log message.
 

Modified: base/trunk/mpulsweb/model/case.py
===================================================================
--- base/trunk/mpulsweb/model/case.py	2010-07-02 16:27:26 UTC (rev 3119)
+++ base/trunk/mpulsweb/model/case.py	2010-07-02 16:31:01 UTC (rev 3120)
@@ -1178,7 +1178,8 @@
                 db.recycleConnection(conn, cur)
             return True
         except:
-            traceback.print_exc(file=sys.stderr)
+            log.exception("Error while setting state of case %d"
+                          % (self.master_id,))
         return False
 
     def getPhase(self):



More information about the Mpuls-commits mailing list