Fix the concatenation of error output.
The "x or y" construct does not have the precedence it looks like it has.
This commit is contained in:
parent
094ad38310
commit
f276f0f825
@ -195,7 +195,7 @@ def _run_program(argv, root='/', stdin=None, stdout=None, env_prune=None, log_ou
|
|||||||
program_log.debug("Return code: %d", proc.returncode)
|
program_log.debug("Return code: %d", proc.returncode)
|
||||||
|
|
||||||
if proc.returncode and raise_err:
|
if proc.returncode and raise_err:
|
||||||
output = output_string or "" + err_string or ""
|
output = (output_string or "") + (err_string or "")
|
||||||
raise subprocess.CalledProcessError(proc.returncode, argv, output)
|
raise subprocess.CalledProcessError(proc.returncode, argv, output)
|
||||||
|
|
||||||
return (proc.returncode, output_string)
|
return (proc.returncode, output_string)
|
||||||
|
Loading…
Reference in New Issue
Block a user