[Mpuls-commits] r2227 - in wasko/branches/2.0: . mpulsweb/model

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Fri Mar 26 12:37:17 CET 2010


Author: bh
Date: 2010-03-26 12:37:16 +0100 (Fri, 26 Mar 2010)
New Revision: 2227

Modified:
   wasko/branches/2.0/ChangeLog
   wasko/branches/2.0/mpulsweb/model/phase.py
Log:
* mpulsweb/model/phase.py (PhaseFactory.load): Extract common
subexpression into local variable.


Modified: wasko/branches/2.0/ChangeLog
===================================================================
--- wasko/branches/2.0/ChangeLog	2010-03-25 20:03:47 UTC (rev 2226)
+++ wasko/branches/2.0/ChangeLog	2010-03-26 11:37:16 UTC (rev 2227)
@@ -1,3 +1,8 @@
+2010-03-26  Bernhard Herzog  <bh at intevation.de>
+
+	* mpulsweb/model/phase.py (PhaseFactory.load): Extract common
+	subexpression into local variable.
+
 2010-03-25  Bernhard Herzog  <bh at intevation.de>
 
 	* mpulsweb/controllers/settings.py: Fix formatting.

Modified: wasko/branches/2.0/mpulsweb/model/phase.py
===================================================================
--- wasko/branches/2.0/mpulsweb/model/phase.py	2010-03-25 20:03:47 UTC (rev 2226)
+++ wasko/branches/2.0/mpulsweb/model/phase.py	2010-03-26 11:37:16 UTC (rev 2227)
@@ -25,9 +25,10 @@
         factory = InstanceFactory(g.formedTree, PostgresDBInterface())
         it = factory.loadInstanceTreeByIdentifier(id)
         for p in g.mpuls_config.get('phases', 'phases'):
-            desc  = g.mpuls_config.get('phases', 'description')[0].get(p)
-            start = StartPhasePart(g.mpuls_config.get('phases', 'pairs')[0].get(p)[0],p, it)
-            end   = EndPhasePart(g.mpuls_config.get('phases', 'pairs')[0].get(p)[1],p, it)
+            desc = g.mpuls_config.get('phases', 'description')[0].get(p)
+            pair = g.mpuls_config.get('phases', 'pairs')[0].get(p)
+            start = StartPhasePart(pair[0], p, it)
+            end = EndPhasePart(pair[1], p, it)
             self.phases.append(Phase(start, end, desc))
         return self.phases
 



More information about the Mpuls-commits mailing list