Mercurial > hg
diff mercurial/packagescan.py @ 1841:7f12a63568ae
Fix py2exe packagescan problem with new demandload
author | Eung-ju Park <eungju@gmail.com> |
---|---|
date | Mon, 06 Mar 2006 10:49:34 -0800 |
parents | 2073e5a71008 |
children | 685597676a13 c58a403aa830 |
line wrap: on
line diff
--- a/mercurial/packagescan.py Sun Mar 05 01:37:28 2006 -0800 +++ b/mercurial/packagescan.py Mon Mar 06 10:49:34 2006 -0800 @@ -16,8 +16,14 @@ """ fake demandload function that collects the required modules """ for m in modules.split(): mod = None - mod = __import__(m,scope,scope) - scope[m] = mod + try: + module, submodules = m.split(':') + submodules = submodules.split(',') + except: + module = m + submodules = [] + mod = __import__(module, scope, scope, submodules) + scope[module] = mod requiredmodules[mod.__name__] = 1 def getmodules(libpath,packagename):