[Mpuls-commits] r767 - in wasko/branches/2.0: . waskaweb/lib

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Tue Jan 19 18:59:42 CET 2010


Author: bh
Date: 2010-01-19 18:59:38 +0100 (Tue, 19 Jan 2010)
New Revision: 767

Modified:
   wasko/branches/2.0/ChangeLog.txt
   wasko/branches/2.0/waskaweb/lib/base.py
Log:
* waskaweb/lib/base.py (BaseController.__before__): Write error
message to log instead of stderr.  Remove unnecessary debug log


Modified: wasko/branches/2.0/ChangeLog.txt
===================================================================
--- wasko/branches/2.0/ChangeLog.txt	2010-01-19 17:53:54 UTC (rev 766)
+++ wasko/branches/2.0/ChangeLog.txt	2010-01-19 17:59:38 UTC (rev 767)
@@ -1,5 +1,10 @@
 2010-01-19  Bernhard Herzog  <bh at intevation.de>
 
+	* waskaweb/lib/base.py (BaseController.__before__): Write error
+	message to log instead of stderr.  Remove unnecessary debug log
+
+2010-01-19  Bernhard Herzog  <bh at intevation.de>
+
 	* waskaweb/lib/app_globals.py: Remove unused imports
 
 2010-01-19  Bernhard Herzog  <bh at intevation.de>

Modified: wasko/branches/2.0/waskaweb/lib/base.py
===================================================================
--- wasko/branches/2.0/waskaweb/lib/base.py	2010-01-19 17:53:54 UTC (rev 766)
+++ wasko/branches/2.0/waskaweb/lib/base.py	2010-01-19 17:59:38 UTC (rev 767)
@@ -1,4 +1,4 @@
-# Copyright 2007, 2008 Intevation GmbH, Germany, <info at intevation.de>
+# Copyright 2007, 2008, 2010 Intevation GmbH, Germany, <info at intevation.de>
 # 
 # This file is part of mpuls WASKA (CoMPUter-based case fiLeS - 
 # Web-Anwendungs-Server fuer Kompetenzagenturen).
@@ -66,7 +66,6 @@
     def __before__(self):
 
         # Determine if we have a server for normal use or for evalutation purpose.
-        log.debug(config.get('beaker.session.key'))
         c.isEvaluationServer = config.get('evaluation_server', '0') == '1'
 
         try:
@@ -75,11 +74,11 @@
                 shared = request.cookies['waska_auth']
 
             except KeyError:
-                print >> sys.stderr, "Cannot find waska_auth cookie -> HTTPUnauthorized"
+                log.error("Cannot find waska_auth cookie -> HTTPUnauthorized")
                 raise HTTPUnauthorized(detail = COOKIE_NOT_FOUND)
 
             if storedHash != md5.new(shared + userIdentity()).digest():
-                print >> sys.stderr, "Stored hash does't match new hash -> HTTPUnauthorized"
+                log.error("Stored hash does't match new hash -> HTTPUnauthorized")
                 raise HTTPUnauthorized(detail = IDENTITY_CHANGED)
         except KeyError:
             pass



More information about the Mpuls-commits mailing list