Skip to content

Commit

Permalink
Fix error
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonGross committed Nov 8, 2024
1 parent 9b6f505 commit 73373ef
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions gbmi/utils/images.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ def batch_run(
if stderr_write is None:
stderr_write = partial(print, file=sys.stderr)

process = None
try:
process = subprocess.Popen(
[*args, *map(str, images), *post_args],
Expand All @@ -137,6 +138,7 @@ def batch_run(

if check and process.returncode != 0:
raise subprocess.CalledProcessError(process.returncode, process.args)

except (FileNotFoundError, subprocess.CalledProcessError, OSError) as e:
if wrap_errs is not None:
stderr_write(f"Error: {e}")
Expand Down

0 comments on commit 73373ef

Please sign in to comment.