Commit f0fdf356 authored by Jim Fulton's avatar Jim Fulton

Stop using os.spawn.

parent c8c09bf0
......@@ -25,8 +25,6 @@ from optparse import OptionParser
tmpeggs = tempfile.mkdtemp()
is_jython = sys.platform.startswith('java')
# parsing arguments
parser = OptionParser(
'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:
cmd.append('zc.buildout' + VERSION)
if is_jython:
import subprocess
exitcode = subprocess.Popen(cmd, env=env).wait()
else: # Windows prefers this, apparently; otherwise we would prefer subprocess
exitcode = os.spawnle(*([os.P_WAIT, sys.executable] + cmd + [env]))
assert exitcode == 0
import subprocess
if subprocess.call(cmd, env=env) != 0:
raise Exception(
"Failed to execute command:\n%s",
repr(cmd)[1:-1])
ws.add_entry(tmpeggs)
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