# HG changeset patch # User Ingo Weinzierl # Date 1283452012 -7200 # Node ID a9f2e8fd8970fc139e0a9c348731028284bf83fe # Parent f96a18c10836a8c695460c2e12a8ff1f6c1e7452 'NoneType' time values don't break getan while switching time mode anymore (issue1575). diff -r f96a18c10836 -r a9f2e8fd8970 ChangeLog --- a/ChangeLog Tue Aug 31 19:37:37 2010 +0200 +++ b/ChangeLog Thu Sep 02 20:26:52 2010 +0200 @@ -1,3 +1,10 @@ +2010-09-02 Ingo Weinzierl + + ISSUE1575 + + * getan/view.py: Verify that time values are not null before adding them to + total time. Avoids getan crashing while switching the time mode. + 2010-08-31 Ingo Weinzierl * getan.py, getan/backend.py: Made getan Python-2.4 compatible. diff -r f96a18c10836 -r a9f2e8fd8970 getan/view.py --- a/getan/view.py Tue Aug 31 19:37:37 2010 +0200 +++ b/getan/view.py Thu Sep 02 20:26:52 2010 +0200 @@ -191,7 +191,9 @@ logger.debug("ProjectList: update projects total time.") total = 0 for proj in self.rows: - total += proj._get_time() + tmp = proj._get_time() + if tmp and type(tmp) == int: + total += tmp self.frame.set_footer(urwid.AttrWrap( urwid.Text(' Alle Projekte: %s %s' % (proj.mode[1],human_time(total))), 'project_footer'))