From 5e6ab6854f3ad7ebdf16e14fe9066c17894cdaf6 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Wed, 4 Jun 2025 16:26:46 +0200 Subject: [PATCH] ref: Use recommended subprocess method to edit --- topen.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/topen.py b/topen.py index 7585d5a..a13b444 100755 --- a/topen.py +++ b/topen.py @@ -93,8 +93,7 @@ def get_notes_file(uuid: str, notes_dir: Path, notes_ext: str) -> Path: def open_editor(file: Path, editor: str) -> None: """Opens a file with the chosen editor.""" _ = whisper(f"Editing note: {file}") - proc = subprocess.Popen(f"{editor} {file}", shell=True) - _ = proc.wait() + _ = subprocess.run(f"{editor} {file}", shell=True) def add_annotation_if_missing(task: Task, annotation_content: str) -> None: