[Mpuls-commits] r1755 - wasko/branches/2.0/mpulsweb/model

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Wed Feb 24 16:01:35 CET 2010


Author: torsten
Date: 2010-02-24 16:01:33 +0100 (Wed, 24 Feb 2010)
New Revision: 1755

Modified:
   wasko/branches/2.0/mpulsweb/model/phase.py
Log:
Enabled calculation of phase duration


Modified: wasko/branches/2.0/mpulsweb/model/phase.py
===================================================================
--- wasko/branches/2.0/mpulsweb/model/phase.py	2010-02-24 14:40:18 UTC (rev 1754)
+++ wasko/branches/2.0/mpulsweb/model/phase.py	2010-02-24 15:01:33 UTC (rev 1755)
@@ -49,18 +49,16 @@
         return self.end
 
     def getDuration(self):
-        #t1 = self.start.getTime()
-        #t2 = self.end.getTime()
-        #if not t1 or not t2: return None
-        #return t2 - t1
-        pass
+        t1 = self.start.getTime()
+        t2 = self.end.getTime()
+        if not t1 or not t2: return None
+        return t2 - t1
 
     def getDescription(self):
         return self.description
 
     def isRunning(self):
-        return True
-        #return self.start.isRunning() or self.end.isRunning()
+        return self.start.isRunning() or self.end.isRunning()
 
 class PhasePart:
     def __init__(self, id, it):



More information about the Mpuls-commits mailing list