about summary refs log tree commit diff stats
path: root/hm/soispha/conf/taskwarrior/hooks/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'hm/soispha/conf/taskwarrior/hooks/scripts')
-rwxr-xr-xhm/soispha/conf/taskwarrior/hooks/scripts/on-modify_track-timewarrior.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/hm/soispha/conf/taskwarrior/hooks/scripts/on-modify_track-timewarrior.py b/hm/soispha/conf/taskwarrior/hooks/scripts/on-modify_track-timewarrior.py
index c8efb596..b482af6a 100755
--- a/hm/soispha/conf/taskwarrior/hooks/scripts/on-modify_track-timewarrior.py
+++ b/hm/soispha/conf/taskwarrior/hooks/scripts/on-modify_track-timewarrior.py
@@ -68,7 +68,7 @@ if "tags" in new:
 combined = " ".join(["'%s'" % tag for tag in tags]).encode("utf-8").strip()
 
 # Task has been started.
-if "start" in new and not "start" in old:
+if "start" in new and "start" not in old:
     # Prevent this task from starting if "task +ACTIVE count" is greater than "MAX_ACTIVE".
     p = subprocess.Popen(
         ["task", "+ACTIVE", "status:pending", "count", "rc.verbose:off"],
@@ -86,7 +86,7 @@ if "start" in new and not "start" in old:
     system("timew start " + combined.decode() + " :yes")
 
 # Task has been stopped.
-elif not "start" in new and "start" in old:
+elif "start" not in new and "start" in old:
     system("timew stop " + combined.decode() + " :yes")
 
 # Any task that is active, with a non-pending status should not be tracked.