diff options
author | Tamas Pal <folti@balabit.com> | 2014-11-05 17:13:31 +0100 |
---|---|---|
committer | Tamas Pal <folti@balabit.com> | 2014-11-05 17:13:31 +0100 |
commit | 48f5476867d8316ee1af55e0e7cfacacbdf0ad68 (patch) | |
tree | 0bb09c673893797115f236836ce865a6710af358 /git/cmd.py | |
parent | 27c577dfd5c7f0fc75cd10ed6606674b56b405bd (diff) | |
download | gitpython-48f5476867d8316ee1af55e0e7cfacacbdf0ad68.tar.gz |
GitRunCommand exception can store stdout output too.
Some git commands, like git merge outputs their problems onto stdout,
instead of stderr, which will be thrown away by the current setup. This
change allows the GitPython commands to store the stdout's value too,
in case of error.
Diffstat (limited to 'git/cmd.py')
-rw-r--r-- | git/cmd.py | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -380,7 +380,10 @@ class Git(LazyMixin): # END handle debug printing if with_exceptions and status != 0: - raise GitCommandError(command, status, stderr_value) + if with_extended_output: + raise GitCommandError(command, status, stderr_value, stdout_value) + else: + raise GitCommandError(command, status, stderr_value) # Allow access to the command's status code if with_extended_output: |