Avoid crashing and burning if no prior recorded time
This commit is contained in:
parent
72b39bc00c
commit
fcb213e058
1 changed files with 2 additions and 1 deletions
|
@ -37,7 +37,8 @@ def pomodoro_logpath():
|
|||
|
||||
def pomodoro_latest_recorded(timestamp = None):
|
||||
if timestamp:
|
||||
config.set('pomodoro', 'second_latest_recorded', pomodoro.get('latest_recorded', None))
|
||||
if pomodoro.get('latest_recorded', None):
|
||||
config.set('pomodoro', 'second_latest_recorded', pomodoro.get('latest_recorded'))
|
||||
config.set('pomodoro', 'latest_recorded', str(timestamp))
|
||||
write()
|
||||
else:
|
||||
|
|
Loading…
Reference in a new issue