pylorax: proc.returncode can be None

So use %s to keep it from generating a Traceback. If a callback is used
and it exits before the process does the returncode can be None.

(cherry picked from commit 4fea0ba7f1)
This commit is contained in:
Brian C. Lane 2016-03-07 16:53:09 -08:00
parent d12fc22673
commit 476deb0e42

View File

@ -192,7 +192,7 @@ def _run_program(argv, root='/', stdin=None, stdout=None, env_prune=None, log_ou
raise
with program_log_lock:
program_log.debug("Return code: %d", proc.returncode)
program_log.debug("Return code: %s", proc.returncode)
if proc.returncode and raise_err:
output = output_string or "" + err_string or ""