diff options
Diffstat (limited to 'lib/git/cmd.py')
-rw-r--r-- | lib/git/cmd.py | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/git/cmd.py b/lib/git/cmd.py index cd848e05..60887f5d 100644 --- a/lib/git/cmd.py +++ b/lib/git/cmd.py @@ -337,16 +337,18 @@ class Git(object): proc.stdout.close() proc.stderr.close() - if with_exceptions and status != 0: - raise GitCommandError(command, status, stderr_value) - if GIT_PYTHON_TRACE == 'full': + cmdstr = " ".join(command) if stderr_value: - print "%s -> %d: '%s' !! '%s'" % (command, status, stdout_value, stderr_value) + print "%s -> %d; stdout: '%s'; stderr: '%s'" % (cmdstr, status, stdout_value, stderr_value) elif stdout_value: - print "%s -> %d: '%s'" % (command, status, stdout_value) + print "%s -> %d; stdout: '%s'" % (cmdstr, status, stdout_value) else: - print "%s -> %d" % (command, status) + print "%s -> %d" % (cmdstr, status) + # END handle debug printing + + if with_exceptions and status != 0: + raise GitCommandError(command, status, stderr_value) # Allow access to the command's status code if with_extended_output: |