surfly/gevent — pull request #265 by sibson (2013-04-05 21:46:03+00:00)
Title: TypeError when raising CalledProcessError under python 2.6,2.5

If a process errors from a check_output call, it causes a TypeError to be raised. This is because python2.6 and 2.5 subprocess.CalledProcessError doesn't support the output keyword argument.

The proposed test will always pass under py2.7 but if you run it without the fix on 2.6 you will see

``` python
~/mnt/gevent/greentest$ python2.6 test__subprocess.py
E.........
======================================================================
ERROR: test_check_output_keyword_error (__main__.Test)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/etdev/mnt/gevent/greentest/greentest.py", line 156, in wrapped
return method(self, *args, **kwargs)
File "/home/etdev/mnt/gevent/greentest/greentest.py", line 145, in wrapped
return method(self, *args, **kwargs)
File "/home/etdev/mnt/gevent/greentest/greentest.py", line 80, in wrapped
return method(self, *args, **kwargs)
File "test__subprocess.py", line 144, in test_check_output_keyword_error
subprocess.check_output([sys.executable, '-c', 'import sys; sys.exit(44)'])
File "/opt/dreamcatcher/lib/python2.6/site-packages/gevent/subprocess.py", line 164, in check_output
raise CalledProcessError(retcode, cmd, output=output)
TypeError: __init__() got an unexpected keyword argument 'output'
```