[Mpuls-commits] r94 - in waska/trunk: . waskaweb/lib

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Thu Aug 28 10:04:15 CEST 2008


Author: teichmann
Date: 2008-08-28 10:04:14 +0200 (Thu, 28 Aug 2008)
New Revision: 94

Modified:
   waska/trunk/ChangeLog.txt
   waska/trunk/waskaweb/lib/needed.py
Log:
Check nc lists phases by description.


Modified: waska/trunk/ChangeLog.txt
===================================================================
--- waska/trunk/ChangeLog.txt	2008-08-28 05:23:56 UTC (rev 93)
+++ waska/trunk/ChangeLog.txt	2008-08-28 08:04:14 UTC (rev 94)
@@ -1,5 +1,9 @@
 2008-08-28  Sascha L. Teichmann <sascha.teichmann at intevation.de>
 
+	* waskaweb/lib/needed.py: Sort nc lists by description.
+
+2008-08-28  Sascha L. Teichmann <sascha.teichmann at intevation.de>
+
 	* waskaweb/model/case.py: Load required fields via
 	  case object now.
 

Modified: waska/trunk/waskaweb/lib/needed.py
===================================================================
--- waska/trunk/waskaweb/lib/needed.py	2008-08-28 05:23:56 UTC (rev 93)
+++ waska/trunk/waskaweb/lib/needed.py	2008-08-28 08:04:14 UTC (rev 94)
@@ -74,6 +74,9 @@
             for v in phases.itervalues():
                 v.append(a)
 
+        for v in phases.itervalues():
+            v.sort(cmp=lambda a, b: cmp(a[0].getDescription(), b[0].getDescription()))
+
         #for k in sorted(phases.iterkeys()):
         #    print >> sys.stderr, "phase '%s': %s" % (
         #        k, ', '.join([nc[0].getName() for nc in phases[k]]))
@@ -119,5 +122,7 @@
 
         return True
 
+    def getPhase(self, phase):
+        return self.phases.get(phase)
 
 # vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8:



More information about the Mpuls-commits mailing list