From 6fe8c41e8ff4d87fd6bb1bc9ae67d0f49b5073f4 Mon Sep 17 00:00:00 2001 From: Tim Golden Date: Sun, 8 Aug 2010 16:18:45 +0000 Subject: Issue #2304: Add additional quotes when using cmd shell on Windows. Original patch from Gabriel Genellina --- Lib/subprocess.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Lib/subprocess.py') diff --git a/Lib/subprocess.py b/Lib/subprocess.py index 395b7a3400..247824b013 100644 --- a/Lib/subprocess.py +++ b/Lib/subprocess.py @@ -853,7 +853,7 @@ class Popen(object): startupinfo.dwFlags |= _subprocess.STARTF_USESHOWWINDOW startupinfo.wShowWindow = _subprocess.SW_HIDE comspec = os.environ.get("COMSPEC", "cmd.exe") - args = comspec + " /c " + args + args = comspec + " /c " + '"%s"' % args if (_subprocess.GetVersion() >= 0x80000000L or os.path.basename(comspec).lower() == "command.com"): # Win9x, or using command.com on NT. We need to -- cgit v1.2.1