fix log_call logging when command is a string

This commit is contained in:
Anders Ingemann 2015-03-06 11:47:37 +01:00 committed by Anders Ingemann
parent d26ba8bea4
commit ec96de3a0e

View file

@ -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,