summaryrefslogtreecommitdiff
path: root/gitdb/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'gitdb/__init__.py')
-rw-r--r--gitdb/__init__.py15
1 files changed, 6 insertions, 9 deletions
diff --git a/gitdb/__init__.py b/gitdb/__init__.py
index 2460145..c5b5547 100644
--- a/gitdb/__init__.py
+++ b/gitdb/__init__.py
@@ -12,15 +12,12 @@ import os
def _init_externals():
"""Initialize external projects by putting them into the path"""
- for module in ('smmap',):
- if 'PYOXIDIZER' not in os.environ:
- sys.path.append(os.path.join(os.path.dirname(__file__), 'ext', module))
-
- try:
- __import__(module)
- except ImportError as e:
- raise ImportError("'%s' could not be imported, assure it is located in your PYTHONPATH" % module) from e
- # END verify import
+ if 'PYOXIDIZER' not in os.environ:
+ where = os.path.join(os.path.dirname(__file__), 'ext', 'smmap')
+ if os.path.exists(where):
+ sys.path.append(where)
+
+ import smmap
# END handle imports
#} END initialization