Use returncode to check if process failed
This commit is contained in:
parent
671a3b8cbb
commit
a9d98a6d0c
1 changed files with 2 additions and 2 deletions
|
@ -125,8 +125,8 @@ class ExecutionApi:
|
|||
outs, errs = process.communicate()
|
||||
while outs is not None:
|
||||
stdout.buffer.write(outs)
|
||||
if errs is not None:
|
||||
raise RuntimeError(f"Execute live '{command}' failed with code {process.returncode}\n{errs}")
|
||||
if process.returncode != 0:
|
||||
raise RuntimeError(f"Execute live '{command}' failed with code {process.returncode}\nerrs: {errs}")
|
||||
|
||||
|
||||
class EnvironmentApi:
|
||||
|
|
Loading…
Reference in a new issue