Commit 280fe994 authored by ufebl's avatar ufebl

Pass cmd as list on Windows as it does not handle single quotes in the command very well

parent 744ecf4a
......@@ -119,7 +119,8 @@ def execute(cmd, env=None, timeout=0, rlimit=None, propagate_sigint=True, input_
#cmd = filter(lambda x: x, cmd.split(' '))
#cmd = shlex.split(cmd[0]) + cmd[1:]
cmd = " ".join(shlex.quote(c) for c in cmd)
if != 'nt': # Windows is fine passing the cmd as a list (even with spaces) but does not handle single quotes well
cmd = " ".join(shlex.quote(c) for c in cmd)
exc = _Execute(cmd, timeout, env, rlimit, input_str)
(out, err, returncode) =
if returncode == -signal.SIGINT:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment