[Mpuls-commits] r5223 - in base/trunk: . mpulsweb/controllers mpulsweb/lib

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Thu Aug 4 11:05:08 CEST 2011


Author: ludwig
Date: 2011-08-04 11:05:05 +0200 (Thu, 04 Aug 2011)
New Revision: 5223

Modified:
   base/trunk/ChangeLog
   base/trunk/mpulsweb/controllers/administration.py
   base/trunk/mpulsweb/lib/search.py
   base/trunk/mpulsweb/lib/validators.py
Log:
Replace prints with log statements

Modified: base/trunk/ChangeLog
===================================================================
--- base/trunk/ChangeLog	2011-08-04 08:45:38 UTC (rev 5222)
+++ base/trunk/ChangeLog	2011-08-04 09:05:05 UTC (rev 5223)
@@ -1,3 +1,11 @@
+2011-08-04  Ludwig Reiter <ludwig.reiter at intevation.de>
+
+	* mpulsweb/controllers/administration.py,
+	mpulsweb/lib/search.py,
+	mpulsweb/lib/validators.py:
+	Replace prints with log statements. Print statements should no longer
+	be used, because we want to use the logging module to log.
+
 2011-08-01  Roland Geider <roland.geider at intevation.de>
 
 	* mpulsweb/lib/base.py: Typo

Modified: base/trunk/mpulsweb/controllers/administration.py
===================================================================
--- base/trunk/mpulsweb/controllers/administration.py	2011-08-04 08:45:38 UTC (rev 5222)
+++ base/trunk/mpulsweb/controllers/administration.py	2011-08-04 09:05:05 UTC (rev 5223)
@@ -222,7 +222,7 @@
                 c.user_list = list.getUserList(filter)
                 c.cases = overview
                 c.phases = PhaseFactory().build() 
-                print c.cases
+                log.debug(c.cases)
                 c.delete_user_id = id
                 return render('/administration/delete_user_helper.mako')
             else:

Modified: base/trunk/mpulsweb/lib/search.py
===================================================================
--- base/trunk/mpulsweb/lib/search.py	2011-08-04 08:45:38 UTC (rev 5222)
+++ base/trunk/mpulsweb/lib/search.py	2011-08-04 09:05:05 UTC (rev 5223)
@@ -73,8 +73,7 @@
                             else:
                                 options[key] = value
                     except ValueError, err:
-                        print >> sys.stderr, \
-                              "Found invalid search syntax in options: %s" % err
+                        log.exception("Found invalid search syntax in options.")
                 else:
                     search.append(option)
         options["search_string"] = search

Modified: base/trunk/mpulsweb/lib/validators.py
===================================================================
--- base/trunk/mpulsweb/lib/validators.py	2011-08-04 08:45:38 UTC (rev 5222)
+++ base/trunk/mpulsweb/lib/validators.py	2011-08-04 09:05:05 UTC (rev 5223)
@@ -445,7 +445,7 @@
             finally:
                 db.recycleConnection(conn, cur)
         except StandardError, err:
-            print "Fehler beim Validieren des Gruppennamens: %s" % err
+            log.exception("Fehler beim Validieren des Gruppennamens.")
 
 
 class LoginCheck(formencode.validators.FancyValidator):
@@ -504,7 +504,7 @@
             finally:
                 db.recycleConnection(conn, cur)
         except StandardError, err:
-            print "Fehler beim Validieren der Anmeldekennung: %s" % err
+            log.exception("Fehler beim Validieren der Anmeldekennung.")
 
 
 class MaxMinInt(formencode.validators.FancyValidator):



More information about the Mpuls-commits mailing list