From e1662184e4c58bbb9a31a8769058b3298cf9052b Mon Sep 17 00:00:00 2001 From: Erik Johnson Date: Fri, 1 Jun 2018 09:57:01 -0500 Subject: [PATCH] Fix exception on import in MacOS This is related to my fix in #658. Apparently, MacOS adds a git executable that is just a stub which displays an error. This gets past the try/except I added in #658, and allows all of the GitPython components to be imported, but since the executable is not *actually* git, it results in an exception when ``refresh()`` attemepts to run a ``git version``. --- git/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/git/__init__.py b/git/__init__.py index 74609e79f..e98806d46 100644 --- a/git/__init__.py +++ b/git/__init__.py @@ -79,5 +79,8 @@ def refresh(path=None): #} END initialize git executable path ################# -refresh() +try: + refresh() +except Exception as exc: + raise ImportError('Failed to initialize: {0}'.format(exc)) ################# 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