summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pym/portage.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/pym/portage.py b/pym/portage.py
index 09a8504bd..f37beb35c 100644
--- a/pym/portage.py
+++ b/pym/portage.py
@@ -1281,7 +1281,11 @@ class config:
def load_best_module(self,property_string):
best_mod = best_from_dict(property_string,self.modules,self.module_priority)
- return load_mod(best_mod)
+ try:
+ mod = load_mod(best_mod)
+ except:
+ writemsg(red("!!! Failed to import module '%s'\n") % best_mod)
+ sys.exit(1)
def lock(self):
self.locked = 1