Mercurial > getan
diff getan @ 21:a06e068e3de8
Handle empty input when adding/subtracting time of the running project
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Tue, 18 Aug 2009 16:59:17 +0200 |
parents | 28489e672e61 |
children |
line wrap: on
line diff
--- a/getan Tue Aug 18 16:55:51 2009 +0200 +++ b/getan Tue Aug 18 16:59:17 2009 +0200 @@ -663,7 +663,7 @@ seconds = timedelta(seconds=seconds) self.current_project.start_time -= seconds stdscr.addstr(ofs + 1, 3, "added %s" % human_time(seconds)) - except ValueError: + except (ValueError, IndexError): pass stdscr.refresh() signal.signal(signal.SIGALRM, alarm_handler) @@ -699,7 +699,7 @@ self.current_project.subtractTime(cur, seconds) finally: tolerantClose(cur) - except ValueError: + except (ValueError, IndexError): pass stdscr.refresh() signal.signal(signal.SIGALRM, alarm_handler)