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:18 2010 >> @@ -829,7 +829,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 > > 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
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4