diff options
Diffstat (limited to 'lib/git/errors.py')
-rw-r--r-- | lib/git/errors.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/git/errors.py b/lib/git/errors.py index f3fae26b..f0a4be1a 100644 --- a/lib/git/errors.py +++ b/lib/git/errors.py @@ -5,4 +5,12 @@ class NoSuchPathError(Exception): pass class GitCommandError(Exception): - pass + def __init__(self, command, status, stderr=None): + self.stderr = stderr + self.status = status + self.command = command + + def __str__(self): + return repr("%s returned exit status %d" % + (str(self.command), self.status)) + |