Skip to content

Commit 451561c

Browse files
committed
Added docs for the error module
1 parent 2454ae8 commit 451561c

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

lib/git/cmd.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,10 @@ def execute(self, command,
102102
103103
str(output) # extended_output = False (Default)
104104
tuple(int(status), str(stdout), str(stderr)) # extended_output = True
105-
105+
106+
Raise
107+
GitCommandError
108+
106109
NOTE
107110
If you add additional keyword arguments to the signature of this method,
108111
you must update the execute_kwargs tuple housed in this module.

lib/git/errors.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,24 @@
33
#
44
# This module is part of GitPython and is released under
55
# the BSD License: http://www.opensource.org/licenses/bsd-license.php
6+
"""
7+
Module containing all exceptions thrown througout the git package,
8+
"""
69

710
class InvalidGitRepositoryError(Exception):
8-
pass
11+
"""
12+
Thrown if the given repository appears to have an invalid format.
13+
"""
914

1015
class NoSuchPathError(Exception):
11-
pass
16+
"""
17+
Thrown if a path could not be access by the system.
18+
"""
1219

1320
class GitCommandError(Exception):
21+
"""
22+
Thrown if execution of the git command fails with non-zero status code.
23+
"""
1424
def __init__(self, command, status, stderr=None):
1525
self.stderr = stderr
1626
self.status = status

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy