diff options
author | Odegard, Ken <ken.odegard@gmail.com> | 2017-07-25 10:09:52 -0500 |
---|---|---|
committer | Odegard, Ken <ken.odegard@gmail.com> | 2017-07-25 10:09:52 -0500 |
commit | 79a36a54b8891839b455c2f39c5d7bc4331a4e03 (patch) | |
tree | da4cf1feb0819ddabdb88f474998956fd02192a2 /git/__init__.py | |
parent | 2b3e769989c4928cf49e335f9e7e6f9465a6bf99 (diff) | |
download | gitpython-79a36a54b8891839b455c2f39c5d7bc4331a4e03.tar.gz |
Minor additional cleanup
Added additional information in the import warning/error that tells the
user how to silence the warning/error. Also added a GIT_OK variable
that allows for a quick check whether the refresh has succeeded instead
of needing to test an actual git command.
Diffstat (limited to 'git/__init__.py')
-rw-r--r-- | git/__init__.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/git/__init__.py b/git/__init__.py index 7005cd60..4ba55305 100644 --- a/git/__init__.py +++ b/git/__init__.py @@ -60,12 +60,19 @@ __all__ = [name for name, obj in locals().items() #{ Initialize git executable path +GIT_OK = None + def refresh(path=None): """Convenience method for setting the git executable path.""" + global GIT_OK + GIT_OK = False + if not Git.refresh(path=path): return if not FetchInfo.refresh(): return + + GIT_OK = True #} END initialize git executable path ################# |