If less than a minute, go straight to quit prompt without offer to record partial time
This commit is contained in:
parent
ce5146b70b
commit
bbf11c1bb1
1 changed files with 9 additions and 7 deletions
|
@ -94,13 +94,15 @@ def main():
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
continue
|
continue
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
time_spent = str_minutes(datetime.now(pytz.utc) - start)
|
time_spent = datetime.now(pytz.utc) - start
|
||||||
print('\n{} time spent, save?'.format(time_spent))
|
if time_spent > timedelta(minutes=INTERRUPTED_MIN):
|
||||||
|
time_spent_str = str_minutes(time_spent)
|
||||||
|
print('\n{} time spent, save?'.format(time_spent_str))
|
||||||
choice = input('[y]/n: ').strip()
|
choice = input('[y]/n: ').strip()
|
||||||
if choice.lower() in ('y', 'yes', ''):
|
if choice.lower() in ('y', 'yes', ''):
|
||||||
whatdid = pomodoro_prompt_report(whatnext)
|
whatdid = pomodoro_prompt_report(whatnext)
|
||||||
record_task(whatdid, start)
|
record_task(whatdid, start)
|
||||||
log_step('Incomplete (' + time_spent + ') pomodoro: ' + whatdid, start, True)
|
log_step('Incomplete (' + time_spent_str + ') pomodoro: ' + whatdid, start, True)
|
||||||
quit_prompt()
|
quit_prompt()
|
||||||
else:
|
else:
|
||||||
print('What did you break?')
|
print('What did you break?')
|
||||||
|
|
Loading…
Reference in a new issue