diff --git a/jrnlwarrior.py b/jrnlwarrior.py index 546a5bf..573188e 100755 --- a/jrnlwarrior.py +++ b/jrnlwarrior.py @@ -8,7 +8,7 @@ import re import os import sys -from subprocess import Popen, PIPE, check_output +import subprocess import options as opts import json from datetime import datetime @@ -91,7 +91,7 @@ def log_completed_to_taskwarrior(task_string, date, options): if options.dryrun: print(cmd) return - Popen(cmd) + subprocess.Popen(cmd) def handle_open_tasks(line, date, options): @@ -119,7 +119,7 @@ def add_incomplete_to_taskwarrior(task_string, date, options): if options.dryrun: print(cmd) return - Popen(cmd) + subprocess.Popen(cmd) def get_prio_string(task_string): @@ -162,7 +162,7 @@ def is_today(cur_date): def add_today(fname, options): cmd = ["task", "+TODAY or +OVERDUE", "export"] tasks = f"[{TODAY} 09:00] {options.todo_block_title}\n" - for task in json.loads(check_output(cmd)): + for task in json.loads(subprocess.check_output(cmd)): tasks += f"{task['description']}\n" if options.dryrun: