[Getan-commits] [PATCH] Let getan crash if entry _get_time doesn't return an int
Wald Commits
scm-commit at wald.intevation.org
Mon Jan 5 10:07:15 CET 2015
# HG changeset patch
# User Björn Ricks <bjoern.ricks at intevation.de>
# Date 1394618241 -3600
# Node ID 47890f38e55848ac5cdbd721361f2f1347752617
# Parent bdc4e45f9f4f5a2bcaf0353ff710b7163ba39feb
Let getan crash if entry _get_time doesn't return an int
It's better to have a traceback when _get_time doesn't return an int then to
silently ignore the time.
diff -r bdc4e45f9f4f -r 47890f38e558 getan/view.py
--- a/getan/view.py Tue Nov 04 17:46:53 2014 +0100
+++ b/getan/view.py Wed Mar 12 10:57:21 2014 +0100
@@ -213,7 +213,7 @@
total = 0
for proj in self.rows:
tmp = proj._get_time()
- if tmp and type(tmp) == int:
+ if tmp:
total += tmp
self.set_footer_info("All projects: %s %s"
% (proj.mode[1], human_time(total)),
More information about the Getan-commits
mailing list