summaryrefslogtreecommitdiff
path: root/git/cmd.py
diff options
context:
space:
mode:
authorKostis Anagnostopoulos <ankostis@gmail.com>2016-10-14 16:50:37 +0200
committerKostis Anagnostopoulos <ankostis@gmail.com>2016-10-14 17:26:45 +0200
commitc8e914eb0dfe6a0eb2de66b6826af5f715aeed6d (patch)
treee37739f510a328496230859cb316ce263b78e470 /git/cmd.py
parent5e6827e98c2732863857c0887d5de4138a8ae48b (diff)
downloadgitpython-c8e914eb0dfe6a0eb2de66b6826af5f715aeed6d.tar.gz
cmd, #525: Always include stdout+stderr in exceptions
+ Ignore `with_extended_output` arg when reaising the exception, keep its behavior when `status==0`.
Diffstat (limited to 'git/cmd.py')
-rw-r--r--git/cmd.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/git/cmd.py b/git/cmd.py
index e3efb25c..f0757301 100644
--- a/git/cmd.py
+++ b/git/cmd.py
@@ -649,10 +649,7 @@ class Git(LazyMixin):
# END handle debug printing
if with_exceptions and status != 0:
- if with_extended_output:
- raise GitCommandError(command, status, stderr_value, stdout_value)
- else:
- raise GitCommandError(command, status, stderr_value)
+ raise GitCommandError(command, status, stderr_value, stdout_value)
if isinstance(stdout_value, bytes) and stdout_as_string: # could also be output_stream
stdout_value = safe_decode(stdout_value)