summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2009-10-08 17:29:52 +0200
committerSebastian Thiel <byronimo@gmail.com>2009-10-08 17:29:52 +0200
commit451561c252323e74696dbe0be36601c95a75a8c3 (patch)
treee415e5645ea651ef4848983e9c5055840236287a
parent2454ae89983a4496a445ce347d7a41c0bb0ea7ae (diff)
downloadgitpython-451561c252323e74696dbe0be36601c95a75a8c3.tar.gz
Added docs for the error module
-rw-r--r--lib/git/cmd.py5
-rw-r--r--lib/git/errors.py14
2 files changed, 16 insertions, 3 deletions
diff --git a/lib/git/cmd.py b/lib/git/cmd.py
index 0a8ff6a2..796928b3 100644
--- a/lib/git/cmd.py
+++ b/lib/git/cmd.py
@@ -102,7 +102,10 @@ class Git(object):
str(output) # extended_output = False (Default)
tuple(int(status), str(stdout), str(stderr)) # extended_output = True
-
+
+ Raise
+ GitCommandError
+
NOTE
If you add additional keyword arguments to the signature of this method,
you must update the execute_kwargs tuple housed in this module.
diff --git a/lib/git/errors.py b/lib/git/errors.py
index bf882d33..2632d5f3 100644
--- a/lib/git/errors.py
+++ b/lib/git/errors.py
@@ -3,14 +3,24 @@
#
# This module is part of GitPython and is released under
# the BSD License: http://www.opensource.org/licenses/bsd-license.php
+"""
+Module containing all exceptions thrown througout the git package,
+"""
class InvalidGitRepositoryError(Exception):
- pass
+ """
+ Thrown if the given repository appears to have an invalid format.
+ """
class NoSuchPathError(Exception):
- pass
+ """
+ Thrown if a path could not be access by the system.
+ """
class GitCommandError(Exception):
+ """
+ Thrown if execution of the git command fails with non-zero status code.
+ """
def __init__(self, command, status, stderr=None):
self.stderr = stderr
self.status = status