From da3426e19665246ef328b90dc4ded276adec7e0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?benjamin=20melan=C3=A7on?= Date: Mon, 6 Jul 2020 08:45:43 -0400 Subject: [PATCH] Run function once for cleaner statements --- pomodoroprompt.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pomodoroprompt.py b/pomodoroprompt.py index e45ae2a..57cd233 100644 --- a/pomodoroprompt.py +++ b/pomodoroprompt.py @@ -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: