summaryrefslogtreecommitdiff
path: root/git/exc.py
diff options
context:
space:
mode:
Diffstat (limited to 'git/exc.py')
-rw-r--r--git/exc.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/git/exc.py b/git/exc.py
index ba57c624..67fb9894 100644
--- a/git/exc.py
+++ b/git/exc.py
@@ -29,10 +29,12 @@ class GitCommandError(Exception):
self.command = command
def __str__(self):
- ret = "'%s' returned exit status %i: %s" % \
- (' '.join(str(i) for i in self.command), self.status, self.stderr)
- if self.stdout is not None:
- ret += "\nstdout: %s" % self.stdout
+ ret = "'%s' returned with exit code %i" % \
+ (' '.join(str(i) for i in self.command), self.status)
+ if self.stderr:
+ ret += "\nstderr: '%s'" % self.stderr
+ if self.stdout:
+ ret += "\nstdout: '%s'" % self.stdout
return ret