From ec96de3a0e8434e3fb0406e0586790baa3f14a80 Mon Sep 17 00:00:00 2001 From: Anders Ingemann Date: Fri, 6 Mar 2015 11:47:37 +0100 Subject: [PATCH] fix log_call logging when command is a string --- bootstrapvz/common/tools.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bootstrapvz/common/tools.py b/bootstrapvz/common/tools.py index f0c30fd..49fb425 100644 --- a/bootstrapvz/common/tools.py +++ b/bootstrapvz/common/tools.py @@ -22,7 +22,10 @@ def log_call(command, stdin=None, env=None, shell=False, cwd=None): command_log = realpath(command[0]).replace('/', '.') log = logging.getLogger(__name__ + command_log) - log.debug('Executing: {command}'.format(command=' '.join(command))) + if type(command) is list: + log.debug('Executing: {command}'.format(command=' '.join(command))) + else: + log.debug('Executing: {command}'.format(command=command)) process = subprocess.Popen(args=command, env=env, shell=shell, cwd=cwd, stdin=subprocess.PIPE,