From 1c2dd54358dd526d1d08a8e4a977f041aff74174 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Wed, 8 Apr 2015 11:43:10 +0200 Subject: fix(cmd): throw GitCommandNotFoundError ... ... if it is not found. Previously, especially on windows, this wasn't explicit. Fixes #248, affects #126 --- git/exc.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'git/exc.py') 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. """ -- cgit v1.2.1