summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Stubbs <jstubbs@gentoo.org>2005-12-21 15:35:57 +0000
committerJason Stubbs <jstubbs@gentoo.org>2005-12-21 15:35:57 +0000
commitca07d1b8d759485b188627733a4bad15ebe855ac (patch)
tree77855ede5638e8c406dba9aace96caf556e39a81
parent8047b0f1ed8ba5195822aa2b0f18a907a44fb92e (diff)
downloadportage-ca07d1b8d759485b188627733a4bad15ebe855ac.tar.gz
portage-ca07d1b8d759485b188627733a4bad15ebe855ac.tar.bz2
portage-ca07d1b8d759485b188627733a4bad15ebe855ac.zip
Check that cache modules load correctly and fail if they don't.
svn path=/main/trunk/; revision=2424
-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