| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,3 +1,6 @@ | |||
| 1 | - [submodule "git/ext/async"] | ||
| 1 | + [submodule "async"] | ||
| 2 | 2 | path = git/ext/async | |
| 3 | 3 | url = git://github.com/gitpython-developers/async.git | |
| 4 | + [submodule "smmap"] | ||
| 5 | + path = git/ext/smmap | ||
| 6 | + url = git://github.com/Byron/smmap.git | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -14,13 +14,15 @@ | |||
| 14 | 14 | #{ Initialization | |
| 15 | 15 | def _init_externals(): | |
| 16 | 16 | """Initialize external projects by putting them into the path""" | |
| 17 | - sys.path.append(os.path.join(os.path.dirname(__file__), 'ext', 'async')) | ||
| 18 | - | ||
| 19 | - try: | ||
| 20 | - import async | ||
| 21 | - except ImportError: | ||
| 22 | - raise ImportError("'async' could not be found in your PYTHONPATH") | ||
| 23 | - #END verify import | ||
| 17 | + ext_base = os.path.join(os.path.dirname(__file__), 'ext') | ||
| 18 | + for package in ('async', 'smmap'): | ||
| 19 | + sys.path.append(os.path.join(ext_base, package)) | ||
| 20 | + try: | ||
| 21 | + __import__(package) | ||
| 22 | + except ImportError: | ||
| 23 | + raise ImportError("%r could not be found in your PYTHONPATH" % package) | ||
| 24 | + #END verify import | ||
| 25 | + #END handle external import | ||
| 24 | 26 | ||
| 25 | 27 | #} END initialization | |
| 26 | 28 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments