summaryrefslogtreecommitdiffstats
path: root/Lib/subprocess.py
diff options
context:
space:
mode:
authorTim Golden <mail@timgolden.me.uk>2010-08-08 16:17:48 (GMT)
committerTim Golden <mail@timgolden.me.uk>2010-08-08 16:17:48 (GMT)
commite3f76168a96c939564e03064f4f9f43e96a3bacb (patch)
treee26f4e34ee8ae0136a97dfdf311f49191c60ee17 /Lib/subprocess.py
parent419e384601c6af03feddace9c0254e7f3920b141 (diff)
downloadcpython-e3f76168a96c939564e03064f4f9f43e96a3bacb.zip
cpython-e3f76168a96c939564e03064f4f9f43e96a3bacb.tar.gz
cpython-e3f76168a96c939564e03064f4f9f43e96a3bacb.tar.bz2
Issue #2304: Add additional quotes when using cmd shell on Windows. Original patch from Gabriel Genellina
Diffstat (limited to 'Lib/subprocess.py')
-rw-r--r--Lib/subprocess.py2
1 files changed, 1 insertions, 1 deletions
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 @@ 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() >= 0x80000000 or
os.path.basename(comspec).lower() == "command.com"):
# Win9x, or using command.com on NT. We need to