mirror of
https://github.com/GothenburgBitFactory/task-timewarrior-hook.git
synced 2025-06-26 10:54:27 +02:00
TI-48: Timewarrior hook is not Python3 compatible
- Thanks to Josh Proehl, Armado Martinez.
This commit is contained in:
parent
5d91528598
commit
339b849fff
1 changed files with 3 additions and 3 deletions
|
@ -57,16 +57,16 @@ combined = ' '.join(['"%s"' % tag for tag in tags]).encode('utf-8').strip()
|
|||
|
||||
# Started task.
|
||||
if 'start' in new and not 'start' in old:
|
||||
os.system('timew start ' + combined + ' :yes')
|
||||
os.system('timew start ' + combined.decode() + ' :yes')
|
||||
|
||||
# Stopped task.
|
||||
elif not 'start' in new and 'start' in old:
|
||||
os.system('timew stop ' + combined + ' :yes')
|
||||
os.system('timew stop ' + combined.decode() + ' :yes')
|
||||
|
||||
# TI-51 - in the taskwarrior hook, deleting a task doesn't stop the watch
|
||||
#
|
||||
# Broadened to: Any task that is active, with a non-pending status should not
|
||||
# be tracked.
|
||||
elif 'start' in new and new['status'] != 'pending':
|
||||
os.system('timew stop ' + combined + ' :yes')
|
||||
os.system('timew stop ' + combined.decode() + ' :yes')
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue