From c29c419f61e40311ee273088bad40a716dac655c Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Fri, 21 Oct 2011 15:50:19 +0200 Subject: [PATCH] also export __target_host to check_call Signed-off-by: Steven Armstrong --- lib/cdist/exec/remote.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/cdist/exec/remote.py b/lib/cdist/exec/remote.py index 259f72d8..433f4cbc 100644 --- a/lib/cdist/exec/remote.py +++ b/lib/cdist/exec/remote.py @@ -128,7 +128,7 @@ class Remote(object): if return_output: return subprocess.check_output(command, env=os_environ).decode() else: - subprocess.check_call(command) + subprocess.check_call(command, env=os_environ) except subprocess.CalledProcessError: raise cdist.Error("Command failed: " + " ".join(command)) except OSError as error: @@ -164,7 +164,7 @@ class Remote(object): if return_output: return subprocess.check_output(command, env=os_environ).decode() else: - subprocess.check_call(command) + subprocess.check_call(command, env=os_environ) except subprocess.CalledProcessError as error: script_content = self.run(["cat", script], return_output=True) self.log.error("Code that raised the error:\n%s", script_content)