From f276f0f8251980a05ef1f26be4a5647012e628a9 Mon Sep 17 00:00:00 2001 From: David Shea Date: Tue, 6 Oct 2015 17:23:35 -0400 Subject: [PATCH] Fix the concatenation of error output. The "x or y" construct does not have the precedence it looks like it has. --- src/pylorax/executils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pylorax/executils.py b/src/pylorax/executils.py index 4d7d6110..1cdd1a31 100644 --- a/src/pylorax/executils.py +++ b/src/pylorax/executils.py @@ -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)