Issue #2304: Add additional quotes when using cmd shell on Windows. Original patch from Gabriel Genellina
diff --git a/Lib/subprocess.py b/Lib/subprocess.py
index ae033d4..760b2a9 100644
--- a/Lib/subprocess.py
+++ b/Lib/subprocess.py
@@ -853,7 +853,7 @@
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() >= 0x80000000 or
os.path.basename(comspec).lower() == "command.com"):
# Win9x, or using command.com on NT. We need to