[transmageddon] Try to fix division by 0 error
- From: Christian Fredrik Kalager Schaller <uraeus src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [transmageddon] Try to fix division by 0 error
- Date: Thu, 17 Sep 2009 15:09:32 +0000 (UTC)
commit 405823b0e0106925a74861e3d0a5ce508dbd3c85
Author: Christian Schaller <christian schaller collabora co uk>
Date: Thu Sep 17 16:08:55 2009 +0100
Try to fix division by 0 error
src/transmageddon.py | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/transmageddon.py b/src/transmageddon.py
index 8c75719..3cdd2a1 100644
--- a/src/transmageddon.py
+++ b/src/transmageddon.py
@@ -341,7 +341,8 @@ class TransmageddonUI (gtk.glade.XML):
timespent = time.time() - self.start_time
percent_remain = (100-percent)
# print percent_remain
- rem = (timespent / percent) * percent_remain
+ if percent != 0:
+ rem = (timespent / percent) * percent_remain
min = rem / 60
sec = rem % 60
time_rem = _("%(min)d:%(sec)02d") % {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]