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()
|
outs, errs = process.communicate()
|
||||||
while outs is not None:
|
while outs is not None:
|
||||||
stdout.buffer.write(outs)
|
stdout.buffer.write(outs)
|
||||||
if errs is not None:
|
if process.returncode != 0:
|
||||||
raise RuntimeError(f"Execute live '{command}' failed with code {process.returncode}\n{errs}")
|
raise RuntimeError(f"Execute live '{command}' failed with code {process.returncode}\nerrs: {errs}")
|
||||||
|
|
||||||
|
|
||||||
class EnvironmentApi:
|
class EnvironmentApi:
|
||||||
|
|
Loading…
Reference in a new issue