Commit 08096356 authored by Denis Bilenko's avatar Denis Bilenko

subprocess: fix check_output on Py2.6 and older

Thanks to Marc Sibson for bugreport, the test and original patch (#265).
parent 29601122
......@@ -161,7 +161,10 @@ def check_output(*popenargs, **kwargs):
cmd = kwargs.get("args")
if cmd is None:
cmd = popenargs[0]
raise CalledProcessError(retcode, cmd, output=output)
ex = CalledProcessError(retcode, cmd)
# on Python 2.6 and older CalledProcessError does not accept 'output' argument
ex.output = output
raise ex
return output
......
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