1 |
On Wed, Dec 21, 2005 at 03:35:58PM +0000, Jason Stubbs wrote: |
2 |
> Author: jstubbs |
3 |
> Date: 2005-12-21 15:35:57 +0000 (Wed, 21 Dec 2005) |
4 |
> New Revision: 2424 |
5 |
> |
6 |
> Modified: |
7 |
> main/trunk/pym/portage.py |
8 |
> Log: |
9 |
> Check that cache modules load correctly and fail if they don't. |
10 |
> |
11 |
> |
12 |
> Modified: main/trunk/pym/portage.py |
13 |
> =================================================================== |
14 |
> --- main/trunk/pym/portage.py 2005-12-21 15:27:25 UTC (rev 2423) |
15 |
> +++ main/trunk/pym/portage.py 2005-12-21 15:35:57 UTC (rev 2424) |
16 |
> @@ -1281,7 +1281,11 @@ |
17 |
> |
18 |
> def load_best_module(self,property_string): |
19 |
> best_mod = best_from_dict(property_string,self.modules,self.module_priority) |
20 |
> - return load_mod(best_mod) |
21 |
> + try: |
22 |
> + mod = load_mod(best_mod) |
23 |
> + except: |
24 |
> + writemsg(red("!!! Failed to import module '%s'\n") % best_mod) |
25 |
> + sys.exit(1) |
26 |
> |
27 |
> def lock(self): |
28 |
> self.locked = 1 |
29 |
Not sure if hiding the exception away (traceback) is a good thing; |
30 |
wrapping it with purdy output, sure, but swallowing it? |
31 |
~harring |