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.
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):