Chromium Code Reviews| Index: subprocess2.py |
| diff --git a/subprocess2.py b/subprocess2.py |
| index 9f547a63bbb84939d9ff29010abee0a99e23cb7d..16c2aac770921479efe4dd74a705ff6b6578ce78 100644 |
| --- a/subprocess2.py |
| +++ b/subprocess2.py |
| @@ -33,8 +33,9 @@ SUBPROCESS_CLEANUP_HACKED = False |
| class CalledProcessError(subprocess.CalledProcessError): |
| """Augment the standard exception with more data.""" |
| - def __init__(self, returncode, cmd, cwd, stdout, stderr): |
| - super(CalledProcessError, self).__init__(returncode, cmd) |
| + def __init__(self, returncode, cmd, cwd, stdout, stderr, output=None): |
| + # output kwarg is for compatability with python's subprocess.check_output |
| + super(CalledProcessError, self).__init__(returncode, cmd, output=output) |
|
iannucci
2014/09/18 20:59:03
why not just output=stdout
tandrii(chromium)
2014/09/18 22:23:05
Done.
|
| self.stdout = stdout |
|
iannucci
2014/09/18 20:59:03
and then say `self.stdout = self.output` for compa
tandrii(chromium)
2014/09/18 22:23:05
Done.
|
| self.stderr = stderr |
| self.cwd = cwd |
| @@ -475,7 +476,7 @@ def check_call_out(args, **kwargs): |
| out, returncode = communicate(args, **kwargs) |
| if returncode: |
| raise CalledProcessError( |
| - returncode, args, kwargs.get('cwd'), out[0], out[1]) |
| + returncode, args, kwargs.get('cwd'), out[0], out[1], output=out[0]) |
| return out |