From d37ef7770fbc22ce07634430d9a61516762a2724 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Tue, 5 Jul 2011 13:42:16 +0200 Subject: Added smmap as submodule, package initialization adjusted to assure it is available --- git/__init__.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'git/__init__.py') diff --git a/git/__init__.py b/git/__init__.py index 4a4200cc..adc5487e 100644 --- a/git/__init__.py +++ b/git/__init__.py @@ -14,13 +14,15 @@ __version__ = 'git' #{ Initialization def _init_externals(): """Initialize external projects by putting them into the path""" - sys.path.append(os.path.join(os.path.dirname(__file__), 'ext', 'async')) - - try: - import async - except ImportError: - raise ImportError("'async' could not be found in your PYTHONPATH") - #END verify import + ext_base = os.path.join(os.path.dirname(__file__), 'ext') + for package in ('async', 'smmap'): + sys.path.append(os.path.join(ext_base, package)) + try: + __import__(package) + except ImportError: + raise ImportError("%r could not be found in your PYTHONPATH" % package) + #END verify import + #END handle external import #} END initialization -- cgit v1.2.3