mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
Fixed error from totals.py while timer is active
I got the following error when I tried to run totals.py while a task was not finished: Traceback (most recent call last): File "/home/davis/.timewarrior/extensions/totals.py", line 101, in <module> end = datetime.datetime.strptime(configuration['temp.report.end'], DATEFORMAT) KeyError: 'temp.report.end' This change fixed that for me.
This commit is contained in:
parent
c23dd3eb5a
commit
68fdcc0b20
1 changed files with 5 additions and 0 deletions
|
@ -97,6 +97,11 @@ if 'temp.report.start' not in configuration:
|
|||
print('There is no data in the database')
|
||||
exit()
|
||||
|
||||
if 'temp.report.end' not in configuration:
|
||||
configuration.update( {
|
||||
'temp.report.end': datetime.datetime.now().strftime( '%Y%m%dT%H%M%SZ' )
|
||||
} )
|
||||
|
||||
start = datetime.datetime.strptime(configuration['temp.report.start'], DATEFORMAT)
|
||||
end = datetime.datetime.strptime(configuration['temp.report.end'], DATEFORMAT)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue