diff options
Diffstat (limited to 'pym/portage/elog/__init__.py')
-rw-r--r-- | pym/portage/elog/__init__.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/pym/portage/elog/__init__.py b/pym/portage/elog/__init__.py index 5ba49793d..c6f6ec47c 100644 --- a/pym/portage/elog/__init__.py +++ b/pym/portage/elog/__init__.py @@ -80,8 +80,10 @@ def elog_process(cpv, mysettings): try: # FIXME: ugly ad.hoc import code # TODO: implement a common portage module loader - logmodule = __import__("portage.elog.mod_"+s) - m = getattr(logmodule, "mod_"+s) + name = "portage.elog.mod_" + s + m = __import__(name) + for comp in name.split(".")[1:]: + m = getattr(m, comp) def timeout_handler(signum, frame): raise PortageException("Timeout in elog_process for system '%s'" % s) import signal @@ -100,7 +102,7 @@ def elog_process(cpv, mysettings): writemsg("!!! Error while importing logging modules " + \ "while loading \"mod_%s\":\n" % str(s)) writemsg("%s\n" % str(e), noiselevel=-1) - except portage.exception.PortageException, e: + except PortageException, e: writemsg("%s\n" % str(e), noiselevel=-1) # clean logfiles to avoid repetitions |