Run function once for cleaner statements

This commit is contained in:
benjamin melançon 2020-07-06 08:45:43 -04:00
parent 42191e8927
commit da3426e196

View file

@ -88,13 +88,13 @@ def main():
log_step('Completed pomodoro: ' + whatdid, start, True)
continue
except KeyboardInterrupt:
time_spent = datetime.now(pytz.utc) - start
print('\n{} time spent, save?'.format(str_minutes(time_spent))
time_spent = str_minutes(datetime.now(pytz.utc) - start)
print('\n{} time spent, save?'.format(time_spent))
choice = input('[y]/n: ').strip()
if choice.lower() in ('y', 'yes', ''):
whatdid = pomodoro_prompt_report(whatnext)
record_task(whatdid, start)
log_step('Incomplete (' + str_minutes(time_spent) + ') pomodoro: ' + whatdid, start, True)
log_step('Incomplete (' + time_spent + ') pomodoro: ' + whatdid, start, True)
else:
quit_prompt()
else: