Gentoo Archives: gentoo-portage-dev

From: Jason Stubbs <jstubbs@g.o>
To: gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] Re: r2424 - main/trunk/pym
Date: Thu, 22 Dec 2005 12:03:42
Message-Id: 200512222103.28555.jstubbs@gentoo.org
In Reply to: [gentoo-portage-dev] Re: r2424 - main/trunk/pym by Brian Harring
1 On Thursday 22 December 2005 16:21, Brian Harring wrote:
2 > On Wed, Dec 21, 2005 at 03:35:58PM +0000, Jason Stubbs wrote:
3 > > Author: jstubbs
4 > > Date: 2005-12-21 15:35:57 +0000 (Wed, 21 Dec 2005)
5 > > New Revision: 2424
6 > >
7 > > Modified:
8 > > main/trunk/pym/portage.py
9 > > Log:
10 > > Check that cache modules load correctly and fail if they don't.
11 > >
12 > >
13 > > Modified: main/trunk/pym/portage.py
14 > > ===================================================================
15 > > --- main/trunk/pym/portage.py 2005-12-21 15:27:25 UTC (rev 2423)
16 > > +++ main/trunk/pym/portage.py 2005-12-21 15:35:57 UTC (rev 2424)
17 > > @@ -1281,7 +1281,11 @@
18 > >
19 > > def load_best_module(self,property_string):
20 > > best_mod =
21 > > best_from_dict(property_string,self.modules,self.module_priority)
22 > > - return load_mod(best_mod)
23 > > + try:
24 > > + mod = load_mod(best_mod)
25 > > + except:
26 > > + writemsg(red("!!! Failed to import module '%s'\n") % best_mod)
27 > > + sys.exit(1)
28 > >
29 > > def lock(self):
30 > > self.locked = 1
31 >
32 > Not sure if hiding the exception away (traceback) is a good thing;
33 > wrapping it with purdy output, sure, but swallowing it?
34
35 If it's failing to import, there's something pretty wrong with it. I'm sure
36 that module authors will know enough to remove the except block. Is there
37 really anything useful gained from dumping the traceback?
38
39 --
40 Jason Stubbs
41 --
42 gentoo-portage-dev@g.o mailing list

Replies

Subject Author
Re: [gentoo-portage-dev] Re: r2424 - main/trunk/pym Zac Medico <zmedico@×××××.com>
Re: [gentoo-portage-dev] Re: r2424 - main/trunk/pym "Petteri Räty" <betelgeuse@g.o>