Put everything in a loop and try continue to not ever end up in the else?
This commit is contained in:
parent
059956c589
commit
62560ad8db
1 changed files with 22 additions and 19 deletions
|
@ -33,7 +33,9 @@ def record_task(whatdid, start, end=None):
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
whatnext = pomodoro_prompt_plan()
|
whatdid = ''
|
||||||
|
while True:
|
||||||
|
whatnext = pomodoro_prompt_plan(whatdid)
|
||||||
|
|
||||||
start = datetime.now(pytz.utc)
|
start = datetime.now(pytz.utc)
|
||||||
end = start + timedelta(minutes=WORK_MIN, seconds=0)
|
end = start + timedelta(minutes=WORK_MIN, seconds=0)
|
||||||
|
@ -45,6 +47,7 @@ def main():
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
whatdid = pomodoro_prompt_report(whatnext)
|
whatdid = pomodoro_prompt_report(whatnext)
|
||||||
record_task(whatdid, start)
|
record_task(whatdid, start)
|
||||||
|
continue
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
print('\n{} time spent, save?'.format(str(diff).split('.')[0]))
|
print('\n{} time spent, save?'.format(str(diff).split('.')[0]))
|
||||||
choice = input('[y]/n: ').strip()
|
choice = input('[y]/n: ').strip()
|
||||||
|
|
Loading…
Reference in a new issue