diff options
author | Jack Jansen <jack.jansen@cwi.nl> | 2003-02-24 15:26:39 (GMT) |
---|---|---|
committer | Jack Jansen <jack.jansen@cwi.nl> | 2003-02-24 15:26:39 (GMT) |
commit | 0c44c0477bf1e6e00c15f6d316e293e56d057e40 (patch) | |
tree | 615cc3034ff6598b7537a5b7ed60661ab5c05d0e /Lib/test/test_popen.py | |
parent | 9ce623fce5707c9c2c9c4716d719e4178a08f80b (diff) | |
download | cpython-0c44c0477bf1e6e00c15f6d316e293e56d057e40.zip cpython-0c44c0477bf1e6e00c15f6d316e293e56d057e40.tar.gz cpython-0c44c0477bf1e6e00c15f6d316e293e56d057e40.tar.bz2 |
sys.executable can contain spaces, cater for this when passing it to
os.popen(). Fixes #692222.
Diffstat (limited to 'Lib/test/test_popen.py')
-rw-r--r-- | Lib/test/test_popen.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_popen.py b/Lib/test/test_popen.py index 9111ec5..7a0ef9b 100644 --- a/Lib/test/test_popen.py +++ b/Lib/test/test_popen.py @@ -15,7 +15,7 @@ from os import popen # This results in Python being spawned and printing the sys.argv list. # We can then eval() the result of this, and see what each argv was. def _do_test_commandline(cmdline, expected): - cmd = '%s -c "import sys;print sys.argv" %s' % (sys.executable, cmdline) + cmd = '"%s" -c "import sys;print sys.argv" %s' % (sys.executable, cmdline) data = popen(cmd).read() got = eval(data)[1:] # strip off argv[0] if got != expected: |