Check that cache modules load correctly and fail if they don't.
authorJason Stubbs <jstubbs@gentoo.org>
Wed, 21 Dec 2005 15:35:57 +0000 (15:35 -0000)
committerJason Stubbs <jstubbs@gentoo.org>
Wed, 21 Dec 2005 15:35:57 +0000 (15:35 -0000)
svn path=/main/trunk/; revision=2424

pym/portage.py

index 09a8504bd8f96dc7196138db1fb03e853e78c32a..f37beb35cd6a3539f065706e6fae4846417534f6 100644 (file)
@@ -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