[Mpuls-commits] r2223 - in wasko/branches/2.0: . mpulsweb/controllers

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Thu Mar 25 20:57:43 CET 2010


Author: bh
Date: 2010-03-25 20:57:41 +0100 (Thu, 25 Mar 2010)
New Revision: 2223

Modified:
   wasko/branches/2.0/ChangeLog
   wasko/branches/2.0/mpulsweb/controllers/phase.py
Log:
* mpulsweb/controllers/phase.py: Fix formatting.


Modified: wasko/branches/2.0/ChangeLog
===================================================================
--- wasko/branches/2.0/ChangeLog	2010-03-25 19:56:21 UTC (rev 2222)
+++ wasko/branches/2.0/ChangeLog	2010-03-25 19:57:41 UTC (rev 2223)
@@ -1,5 +1,9 @@
 2010-03-25  Bernhard Herzog  <bh at intevation.de>
 
+	* mpulsweb/controllers/phase.py: Fix formatting.
+
+2010-03-25  Bernhard Herzog  <bh at intevation.de>
+
 	* mpulsweb/controllers/news.py: Fix formatting.
 
 2010-03-25  Bernhard Herzog  <bh at intevation.de>

Modified: wasko/branches/2.0/mpulsweb/controllers/phase.py
===================================================================
--- wasko/branches/2.0/mpulsweb/controllers/phase.py	2010-03-25 19:56:21 UTC (rev 2222)
+++ wasko/branches/2.0/mpulsweb/controllers/phase.py	2010-03-25 19:57:41 UTC (rev 2223)
@@ -1,7 +1,7 @@
 # -*- coding: utf-8 -*-
 import logging
 
-from pylons import session, g, c
+from pylons import c
 
 from mpulsweb.lib.base import BaseController, h, render, request
 from mpulsweb.lib.security import checkRole
@@ -13,8 +13,10 @@
 Die Phase konnte erfolgreich gewechselt werden. Bitte folgen Sie den
 aufgeführten Schritten, um zur Phasenübersicht fortzufahren."""
 
+
 log = logging.getLogger(__name__)
 
+
 class PhaseController(BaseController):
 
     @checkRole(('admin_ka', 'cm_ka'))
@@ -31,7 +33,7 @@
     def editAction(self):
         case = self._loadCase(request.params.get('case_id'))
         newphase = None
-        
+
         # TODO: This is ugly. The id of the phase to be set is submitted as key
         # (intvalue)) of the submitbutton. So to find the right value, try to
         # convert all keys to int, which should only work for the
@@ -39,17 +41,17 @@
         for newphase in request.params.iterkeys():
             try:
                 newphase = int(newphase)
-                break;
+                break
             except:
                 pass # convert failed, seems not to be the submit button.
                      # Continue...
-        
+
         # Set phase
         state = case.getState()
         state.setPhase(newphase)
 
         # After setting the phase. Show print-dialog
         c.dialog_title = SET_PHASE_NOTIFICATION_SUCCESS
-        c.dialog_text  = SET_PHASE_NOTIFICATION_TEXT_SUCCESS
+        c.dialog_text = SET_PHASE_NOTIFICATION_TEXT_SUCCESS
         c.url_ok = h.url_for(controller='/phase', action='overview', id=case.id)
         return render('/phase/dialogs/success_set_phase.mako')



More information about the Mpuls-commits mailing list