Commit f0fdf356 authored by Jim Fulton's avatar Jim Fulton

Stop using os.spawn.

parent c8c09bf0
...@@ -25,8 +25,6 @@ from optparse import OptionParser ...@@ -25,8 +25,6 @@ from optparse import OptionParser
tmpeggs = tempfile.mkdtemp() tmpeggs = tempfile.mkdtemp()
is_jython = sys.platform.startswith('java')
# parsing arguments # parsing arguments
parser = OptionParser( parser = OptionParser(
'This is a custom version of the zc.buildout %prog script. It is ' 'This is a custom version of the zc.buildout %prog script. It is '
...@@ -113,12 +111,12 @@ if 'bootstrap-testing-find-links' in os.environ: ...@@ -113,12 +111,12 @@ if 'bootstrap-testing-find-links' in os.environ:
cmd.append('zc.buildout' + VERSION) cmd.append('zc.buildout' + VERSION)
if is_jython:
import subprocess import subprocess
exitcode = subprocess.Popen(cmd, env=env).wait() if subprocess.call(cmd, env=env) != 0:
else: # Windows prefers this, apparently; otherwise we would prefer subprocess raise Exception(
exitcode = os.spawnle(*([os.P_WAIT, sys.executable] + cmd + [env])) "Failed to execute command:\n%s",
assert exitcode == 0 repr(cmd)[1:-1])
ws.add_entry(tmpeggs) ws.add_entry(tmpeggs)
ws.require('zc.buildout' + VERSION) ws.require('zc.buildout' + VERSION)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment