Merge 3.5 (script_helper)
This commit is contained in:
commit
798d7fbad4
|
@ -83,16 +83,16 @@ def run_python_until_end(*args, **env_vars):
|
|||
env = {}
|
||||
env.update(env_vars)
|
||||
cmd_line.extend(args)
|
||||
p = subprocess.Popen(cmd_line, stdin=subprocess.PIPE,
|
||||
proc = subprocess.Popen(cmd_line, stdin=subprocess.PIPE,
|
||||
stdout=subprocess.PIPE, stderr=subprocess.PIPE,
|
||||
env=env)
|
||||
with proc:
|
||||
try:
|
||||
out, err = p.communicate()
|
||||
out, err = proc.communicate()
|
||||
finally:
|
||||
proc.kill()
|
||||
subprocess._cleanup()
|
||||
p.stdout.close()
|
||||
p.stderr.close()
|
||||
rc = p.returncode
|
||||
rc = proc.returncode
|
||||
err = strip_python_stderr(err)
|
||||
return _PythonRunResult(rc, out, err), cmd_line
|
||||
|
||||
|
|
Loading…
Reference in New Issue