From 94f653d84b2c57a679d29253ae48fb83c02074fc Mon Sep 17 00:00:00 2001 From: Ivan Reshetnikov Date: Sun, 25 Sep 2022 13:58:10 +0500 Subject: [PATCH] Add `check=True` to subprocess.run --- histd.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/histd.py b/histd.py index c7714e5..c79bf18 100755 --- a/histd.py +++ b/histd.py @@ -37,7 +37,7 @@ def edit_note(base_dir: str, note_date: date): filename = f'{note_date.day:02}.txt' path_to_file = os.path.join(workdir, filename) editor = os.environ.get('EDITOR', 'nano') - subprocess.run([editor, path_to_file]) + subprocess.run([editor, path_to_file], check=True) if __name__ == '__main__':