From bf133253039a409479463902cb2c9fb74ceb59e0 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Fri, 18 Nov 2011 14:56:59 +0100 Subject: [PATCH] if env is not given, os.environ is used -> need to also do that Signed-off-by: Steven Armstrong --- lib/cdist/exec/local.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/cdist/exec/local.py b/lib/cdist/exec/local.py index 0b67c747..613f5cf2 100644 --- a/lib/cdist/exec/local.py +++ b/lib/cdist/exec/local.py @@ -97,7 +97,7 @@ class Local(object): self.log.debug("Local run: %s", command) if env is None: - env = {} + env = os.environ.copy() # Export __target_host for use in __remote_{copy,exec} scripts env['__target_host'] = self.target_host @@ -122,7 +122,7 @@ class Local(object): self.log.debug("Local run script: %s", command) if env is None: - env = {} + env = os.environ.copy() # Export __target_host for use in __remote_{copy,exec} scripts env['__target_host'] = self.target_host