[Python-Dev] [Python-checkins] r83831 - in python/branches/release31-maint/Lib: subprocess.py test/test_subprocess.py (original) (raw)
Tim Golden mail at timgolden.me.uk
Mon Aug 9 07:01:45 CEST 2010
- Previous message: [Python-Dev] r83869 - in python/branches/py3k: Doc/library/socket.rst Doc/whatsnew/3.2.rst Lib/ssl.py Lib/test/test_socket.py Misc/NEWS Modules/socketmodule.c
- Next message: [Python-Dev] Bug in 3.1.2 site.py
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 08/08/2010 11:31 PM, Eric Smith wrote:
On 8/8/10 12:18 PM, tim.golden wrote:
Modified: python/branches/release31-maint/Lib/subprocess.py ============================================================================== --- python/branches/release31-maint/Lib/subprocess.py (original) +++ python/branches/release31-maint/Lib/subprocess.py Sun Aug 8 18🔞18 2010 @@ -829,7 +829,7 @@ startupinfo.dwFlags |= subprocess.STARTFUSESHOWWINDOW startupinfo.wShowWindow = subprocess.SWHIDE 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 If args is a tuple, this fails with a TypeError. I realize args shouldn't be a tuple, but that's not a great failure if it is. I think this would be better written as: args = '{} /c "{}"'.format(compspec, args)
Thanks, Eric. I'll rework.
TJG
- Previous message: [Python-Dev] r83869 - in python/branches/py3k: Doc/library/socket.rst Doc/whatsnew/3.2.rst Lib/ssl.py Lib/test/test_socket.py Misc/NEWS Modules/socketmodule.c
- Next message: [Python-Dev] Bug in 3.1.2 site.py
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]