From 6c237a9cb35d8f1f8f454188bfce315f76f15e65 Mon Sep 17 00:00:00 2001 From: "Brian C. Lane" Date: Mon, 7 Mar 2016 16:53:09 -0800 Subject: [PATCH] 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 4fea0ba7f13a289307cb24e20fb7ff2d15fbadfb) --- 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 1cdd1a31..0fc26cbe 100644 --- a/src/pylorax/executils.py +++ b/src/pylorax/executils.py @@ -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 "")