Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3415e08 commit c3ab5d7Copy full SHA for c3ab5d7
.gitignore
@@ -7,3 +7,4 @@ dist/
7
*.so
8
.noseids
9
*.sublime-workspace
10
+*.egg-info
gitdb/__init__.py
@@ -12,15 +12,12 @@
12
13
def _init_externals():
14
"""Initialize external projects by putting them into the path"""
15
- for module in ('smmap',):
16
- if 'PYOXIDIZER' not in os.environ:
17
- sys.path.append(os.path.join(os.path.dirname(__file__), 'ext', module))
18
-
19
- try:
20
- __import__(module)
21
- except ImportError as e:
22
- raise ImportError("'%s' could not be imported, assure it is located in your PYTHONPATH" % module) from e
23
- # 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
24
# END handle imports
25
26
#} END initialization
0 commit comments