| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -7,3 +7,4 @@ dist/ | |||
| 7 | 7 | *.so | |
| 8 | 8 | .noseids | |
| 9 | 9 | *.sublime-workspace | |
| 10 | + *.egg-info | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -12,15 +12,13 @@ | |||
| 12 | 12 | ||
| 13 | 13 | def _init_externals(): | |
| 14 | 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 | ||
| 15 | + if 'PYOXIDIZER' not in os.environ: | ||
| 16 | + where = os.path.join(os.path.dirname(__file__), 'ext', 'smmap') | ||
| 17 | + if os.path.exists(where): | ||
| 18 | + sys.path.append(where) | ||
| 19 | + | ||
| 20 | + import smmap | ||
| 21 | + del smmap | ||
| 24 | 22 | # END handle imports | |
| 25 | 23 | ||
| 26 | 24 | #} END initialization | |
| Back | FazBrowse Home | New Git URL |
0 commit comments