Commit de613d10 authored by Denis Bilenko's avatar Denis Bilenko

subprocess: do not keep reference longer than necessary

parent 9c528d80
......@@ -154,7 +154,7 @@ def check_output(*popenargs, **kwargs):
if 'stdout' in kwargs:
raise ValueError('stdout argument not allowed, it will be overridden.')
process = Popen(stdout=PIPE, *popenargs, **kwargs)
output, unused_err = process.communicate()
output = process.communicate()[0]
retcode = process.poll()
if retcode:
cmd = kwargs.get("args")
......
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