From ca07d1b8d759485b188627733a4bad15ebe855ac Mon Sep 17 00:00:00 2001 From: Jason Stubbs Date: Wed, 21 Dec 2005 15:35:57 +0000 Subject: [PATCH] Check that cache modules load correctly and fail if they don't. svn path=/main/trunk/; revision=2424 --- pym/portage.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 -- 2.26.2