summaryrefslogtreecommitdiffstats
path: root/Lib/subprocess.py
diff options
context:
space:
mode:
authorTim Golden <mail@timgolden.me.uk>2010-08-08 16:18:45 (GMT)
committerTim Golden <mail@timgolden.me.uk>2010-08-08 16:18:45 (GMT)
commit6fe8c41e8ff4d87fd6bb1bc9ae67d0f49b5073f4 (patch)
tree033d2a36ca09bc5ed11b5a3f88464dd097cf0ea6 /Lib/subprocess.py
parente677ecfccf8a0a54a4e099a3c08cac8a271e9d65 (diff)
downloadcpython-6fe8c41e8ff4d87fd6bb1bc9ae67d0f49b5073f4.zip
cpython-6fe8c41e8ff4d87fd6bb1bc9ae67d0f49b5073f4.tar.gz
cpython-6fe8c41e8ff4d87fd6bb1bc9ae67d0f49b5073f4.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 395b7a3..247824b 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