summaryrefslogtreecommitdiff
path: root/git/exc.py
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2015-04-08 11:43:10 +0200
committerSebastian Thiel <byronimo@gmail.com>2015-04-08 11:50:49 +0200
commit1c2dd54358dd526d1d08a8e4a977f041aff74174 (patch)
tree43b1e954c59e0a83f80a9697c4cc1b011e8fdb8f /git/exc.py
parente9f8f159ebad405b2c08aa75f735146bb8e216ef (diff)
downloadgitpython-1c2dd54358dd526d1d08a8e4a977f041aff74174.tar.gz
fix(cmd): throw GitCommandNotFoundError ...
... if it is not found. Previously, especially on windows, this wasn't explicit. Fixes #248, affects #126
Diffstat (limited to 'git/exc.py')
-rw-r--r--git/exc.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/git/exc.py b/git/exc.py
index 7ee6726e..f5b52374 100644
--- a/git/exc.py
+++ b/git/exc.py
@@ -18,6 +18,12 @@ class NoSuchPathError(OSError):
""" Thrown if a path could not be access by the system. """
+class GitCommandNotFound(Exception):
+ """Thrown if we cannot find the `git` executable in the PATH or at the path given by
+ the GIT_PYTHON_GIT_EXECUTABLE environment variable"""
+ pass
+
+
class GitCommandError(Exception):
""" Thrown if execution of the git command fails with non-zero status code. """