Timewarrior use Logger instead of print
This commit is contained in:
parent
4692e0f914
commit
6016c52a87
@ -6,7 +6,7 @@ from datetime import datetime, timezone
|
|||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
|
|
||||||
class TImewarrior(IntervalModule):
|
class Timewarrior(IntervalModule):
|
||||||
"""
|
"""
|
||||||
Show current Timewarrior tracking
|
Show current Timewarrior tracking
|
||||||
Requires `json` `dateutil`
|
Requires `json` `dateutil`
|
||||||
@ -42,7 +42,7 @@ class TImewarrior(IntervalModule):
|
|||||||
self.track = tracks[-1]
|
self.track = tracks[-1]
|
||||||
|
|
||||||
except ValueError as error:
|
except ValueError as error:
|
||||||
print('Decoding JSON has failed')
|
self.logger.exception('Decoding JSON has failed')
|
||||||
raise error
|
raise error
|
||||||
|
|
||||||
def stop_or_continue(self):
|
def stop_or_continue(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user