summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-09-16 15:25:23 -0700
committerZac Medico <zmedico@gentoo.org>2010-09-16 15:31:45 -0700
commitcc799474fb8f6ae476788d3768c4a3b341f3e7e8 (patch)
tree8fe5c22fa7082c126ee7c0bab9b99093bee1dd16
parentFix misspelling of DependencyArg.__eq__() method. (diff)
downloadportage-cc799474fb8f6ae476788d3768c4a3b341f3e7e8.tar.gz
portage-cc799474fb8f6ae476788d3768c4a3b341f3e7e8.tar.bz2
portage-cc799474fb8f6ae476788d3768c4a3b341f3e7e8.zip
Bug #337702 - Fix config.load_best_module() to raise ImportError from
the indentation block that caught it. In python3, we get a "RuntimeError: No active exception to reraise" exception if we try to call raise after completion of the indentation block were the last exception was caught.
-rw-r--r--pym/portage/package/ebuild/config.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py
index 7c1060f12..aa8d3c0a1 100644
--- a/pym/portage/package/ebuild/config.py
+++ b/pym/portage/package/ebuild/config.py
@@ -886,14 +886,14 @@ class config(object):
try:
mod = load_mod(best_mod)
except ImportError:
- if best_mod.startswith("cache."):
+ if not best_mod.startswith("cache."):
+ raise
+ else:
best_mod = "portage." + best_mod
try:
mod = load_mod(best_mod)
except ImportError:
- pass
- if mod is None:
- raise
+ raise
return mod
def lock(self):