Use returncode to check if process failed

This commit is contained in:
bom 2024-02-24 12:11:57 +01:00
parent 671a3b8cbb
commit a9d98a6d0c

View file

@ -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: