فهرست منبع

if there is no lastAction (i.e. the job hasnt even run yet), return 0. because progress is 0.

Oren Mazor 10 سال پیش
والد
کامیت
51824b9
1فایلهای تغییر یافته به همراه3 افزوده شده و 0 حذف شده
  1. 3 0
      desktop/libs/liboozie/src/liboozie/types.py

+ 3 - 0
desktop/libs/liboozie/src/liboozie/types.py

@@ -274,6 +274,9 @@ class BundleAction(Action):
 
   def get_progress(self):
     """How much more time before the next action."""
+    if self.lastAction is None:
+      return 0
+      
     next = mktime(parse_timestamp(self.lastAction))
     start = mktime(parse_timestamp(self.startTime))
     end = mktime(parse_timestamp(self.endTime))