diff options
author | Zac Medico <zmedico@gentoo.org> | 2007-11-30 19:38:48 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2007-11-30 19:38:48 +0000 |
commit | efda32534112b27e56a1be94e9af41beb39b611d (patch) | |
tree | 114f53e51c741d1f96d3fd1faaaf4ee1a060d864 /pym | |
parent | e9641e766eaab3aab5897a8ff79cc187beca40da (diff) | |
download | portage-efda32534112b27e56a1be94e9af41beb39b611d.tar.gz portage-efda32534112b27e56a1be94e9af41beb39b611d.tar.bz2 portage-efda32534112b27e56a1be94e9af41beb39b611d.zip |
Fix broken module loading logic.
svn path=/main/branches/2.1.2/; revision=8767
Diffstat (limited to 'pym')
-rw-r--r-- | pym/portage.py | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/pym/portage.py b/pym/portage.py index 6033cf609..fe8088e4c 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -506,11 +506,12 @@ def elog_process(cpv, mysettings): # - is nicer than _ for module names, so allow people to use it. s = s.replace("-", "_") try: - logmodule = __import__("elog_modules.mod_"+s) - m = _elog_mod_imports.get(logmodule) + name = "elog_modules.mod_"+s + m = _elog_mod_imports.get(name) if m is None: + logmodule = __import__(name) m = getattr(logmodule, "mod_"+s) - _elog_mod_imports[logmodule] = m + _elog_mod_imports[name] = m except ImportError: pass @@ -585,11 +586,12 @@ def elog_process(cpv, mysettings): try: # FIXME: ugly ad.hoc import code # TODO: implement a common portage module loader - logmodule = __import__("elog_modules.mod_"+s) - m = _elog_mod_imports.get(logmodule) + name = "elog_modules.mod_"+s + m = _elog_mod_imports.get(name) if m is None: + logmodule = __import__(name) m = getattr(logmodule, "mod_"+s) - _elog_mod_imports[logmodule] = m + _elog_mod_imports[name] = m def timeout_handler(signum, frame): raise portage_exception.PortageException( "Timeout in elog_process for system '%s'" % s) |