summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-02-13 19:57:44 +0000
committerZac Medico <zmedico@gentoo.org>2007-02-13 19:57:44 +0000
commit651c575391fd442b3a6f5d33ca05d2ec108cc1c0 (patch)
treec45330c00cbe6de15c408550a37df18e10484709
parentd687a429e68f1a59244aaeff9f814b6b934fb840 (diff)
downloadportage-651c575391fd442b3a6f5d33ca05d2ec108cc1c0.tar.gz
portage-651c575391fd442b3a6f5d33ca05d2ec108cc1c0.tar.bz2
portage-651c575391fd442b3a6f5d33ca05d2ec108cc1c0.zip
Fix broken imports.
svn path=/main/trunk/; revision=5963
-rw-r--r--pym/portage/elog/__init__.py8
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