From 8cf8877e507afa24d668a3737121398367cbca11 Mon Sep 17 00:00:00 2001 From: "Brian C. Lane" Date: Fri, 4 Mar 2016 13:43:43 -0800 Subject: [PATCH] pylorax: Fix undefind strings on subprocess crash Set output_string and err_string to None so that a crash will not crash. --- src/pylorax/executils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pylorax/executils.py b/src/pylorax/executils.py index 1cdd1a31..0dd8d969 100644 --- a/src/pylorax/executils.py +++ b/src/pylorax/executils.py @@ -153,6 +153,8 @@ def _run_program(argv, root='/', stdin=None, stdout=None, env_prune=None, log_ou env_prune=env_prune, universal_newlines=not binary_output, env_add=env_add, reset_handlers=reset_handlers, reset_lang=reset_lang) + output_string = None + err_string = None if callback: while callback(proc) and proc.poll() is None: try: