diff options
author | Jesse Kaukonen <jesse.kaukonen@gmail.com> | 2010-11-03 19:06:14 +0300 |
---|---|---|
committer | Jesse Kaukonen <jesse.kaukonen@gmail.com> | 2010-11-03 19:06:14 +0300 |
commit | 0d6f4cf43a8ce9570e2aa9a95c5a5002c3c447e6 (patch) | |
tree | eae191026f1fb56d9c6c3c63ca278d4cea05e22c | |
parent | 21bb43f8c1f4e6e2470b4140655d677d1c3f43ba (diff) |
Division by zero problem fixed
-rw-r--r-- | render_renderfarmfi.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/render_renderfarmfi.py b/render_renderfarmfi.py index cb0c551e..dbf563fe 100644 --- a/render_renderfarmfi.py +++ b/render_renderfarmfi.py @@ -459,8 +459,13 @@ class OreSession: def percentageComplete(self): totFrames = self.endframe - self.startframe - done = math.floor((self.frames / totFrames)*100) - if done > 100: done = 100 + if totFrames != 0: + done = math.floor((self.frames / totFrames)*100) + else: + done = math.floor((self.frames / (totFrames+0.01))*100) + + if done > 100: + done = 100 return done def xmlSessionsToOreSessions(sessions, queue): |