Add check=True
to subprocess.run
This commit is contained in:
parent
767f5b16b7
commit
94f653d84b
1 changed files with 1 additions and 1 deletions
2
histd.py
2
histd.py
|
@ -37,7 +37,7 @@ def edit_note(base_dir: str, note_date: date):
|
||||||
filename = f'{note_date.day:02}.txt'
|
filename = f'{note_date.day:02}.txt'
|
||||||
path_to_file = os.path.join(workdir, filename)
|
path_to_file = os.path.join(workdir, filename)
|
||||||
editor = os.environ.get('EDITOR', 'nano')
|
editor = os.environ.get('EDITOR', 'nano')
|
||||||
subprocess.run([editor, path_to_file])
|
subprocess.run([editor, path_to_file], check=True)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|
Loading…
Reference in a new issue