diff --git a/src/pylorax/executils.py b/src/pylorax/executils.py index 25c9eef9..4d7d6110 100644 --- a/src/pylorax/executils.py +++ b/src/pylorax/executils.py @@ -195,7 +195,8 @@ 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: - raise subprocess.CalledProcessError(proc.returncode, argv) + output = output_string or "" + err_string or "" + raise subprocess.CalledProcessError(proc.returncode, argv, output) return (proc.returncode, output_string)