Skip to content

Commit

Permalink
Handle failure of subprocess more gracefully
Browse files Browse the repository at this point in the history
Fixes UnboundLocalError: local variable 'output' referenced before assignment
  • Loading branch information
paulgear committed Jan 5, 2024
1 parent 373a0b0 commit 55e7f21
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@


def execute_subprocess(cmd, timeout, debug, errfatal):
output = None
try:
output = subprocess.check_output(
cmd,
Expand Down

0 comments on commit 55e7f21

Please sign in to comment.