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.
This commit is contained in:
Brian C. Lane 2016-03-07 16:53:09 -08:00
parent 4699c88109
commit 4fea0ba7f1

View File

@ -194,7 +194,7 @@ def _run_program(argv, root='/', stdin=None, stdout=None, env_prune=None, log_ou
raise raise
with program_log_lock: 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: if proc.returncode and raise_err:
output = (output_string or "") + (err_string or "") output = (output_string or "") + (err_string or "")