mirror of https://github.com/python/cpython
Fix for bug #1634343: allow specifying empty arguments on Windows
This commit is contained in:
parent
4347c135ce
commit
29794ecd43
|
@ -499,7 +499,7 @@ def list2cmdline(seq):
|
|||
if result:
|
||||
result.append(' ')
|
||||
|
||||
needquote = (" " in arg) or ("\t" in arg)
|
||||
needquote = (" " in arg) or ("\t" in arg) or arg == ""
|
||||
if needquote:
|
||||
result.append('"')
|
||||
|
||||
|
|
|
@ -430,6 +430,8 @@ class ProcessTestCase(unittest.TestCase):
|
|||
'"a\\\\b c" d e')
|
||||
self.assertEqual(subprocess.list2cmdline(['a\\\\b\\ c', 'd', 'e']),
|
||||
'"a\\\\b\\ c" d e')
|
||||
self.assertEqual(subprocess.list2cmdline(['ab', '']),
|
||||
'ab ""')
|
||||
|
||||
|
||||
def test_poll(self):
|
||||
|
|
Loading…
Reference in New Issue