summaryrefslogtreecommitdiff
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 /pym/portage.py
parent- make quiet really mean it (diff)
downloadportage-multirepo-ca07d1b8d759485b188627733a4bad15ebe855ac.tar.gz
portage-multirepo-ca07d1b8d759485b188627733a4bad15ebe855ac.tar.bz2
portage-multirepo-ca07d1b8d759485b188627733a4bad15ebe855ac.zip
Check that cache modules load correctly and fail if they don't.
svn path=/main/trunk/; revision=2424
Diffstat (limited to 'pym/portage.py')
-rw-r--r--pym/portage.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/pym/portage.py b/pym/portage.py
index 09a8504b..f37beb35 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