From c8e914eb0dfe6a0eb2de66b6826af5f715aeed6d Mon Sep 17 00:00:00 2001 From: Kostis Anagnostopoulos Date: Fri, 14 Oct 2016 16:50:37 +0200 Subject: cmd, #525: Always include stdout+stderr in exceptions + Ignore `with_extended_output` arg when reaising the exception, keep its behavior when `status==0`. --- git/cmd.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'git/cmd.py') 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) -- cgit v1.2.3