From 5b01b589e7a19d6be5bd6465e600f84aa8015282 Mon Sep 17 00:00:00 2001 From: Florian Apolloner Date: Fri, 20 Jun 2008 23:22:52 +0200 Subject: made with_exceptions=True default (don't look before you leak ;)) and removed the combined output of stderr and stdout. Also renamed with_status to extended_output. The method_missing function needs to be modified, as it does a kwargs.pop(xxx, None); which resulted in with_excpetions=None -> False all the time... Test should follow tomorrow. --- lib/git/errors.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'lib/git/errors.py') 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)) + -- cgit v1.2.1