only print env, if existent

Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
Nico Schottelius 2011-09-26 16:03:53 +02:00
parent 4906f604f0
commit 7882b4a3ac

View file

@ -38,7 +38,10 @@ def shell_run_or_debug_fail(script, *args, **kargs):
del kargs["remote_prefix"] del kargs["remote_prefix"]
log.debug("Shell exec cmd: %s", args) log.debug("Shell exec cmd: %s", args)
log.debug("Shell exec env: %s", kargs['env'])
if 'env' in kargs:
log.debug("Shell exec env: %s", kargs['env'])
try: try:
subprocess.check_call(*args, **kargs) subprocess.check_call(*args, **kargs)
except subprocess.CalledProcessError: except subprocess.CalledProcessError: