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:
David Shea 2015-10-06 17:23:35 -04:00
parent 094ad38310
commit f276f0f825

View File

@ -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)
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)
return (proc.returncode, output_string)