1 |
Author: zmedico |
2 |
Date: 2008-05-26 23:22:15 +0000 (Mon, 26 May 2008) |
3 |
New Revision: 10434 |
4 |
|
5 |
Modified: |
6 |
main/trunk/pym/portage/dbapi/vartree.py |
7 |
Log: |
8 |
Don't silently swallow instances of UnpicklingError since they are easily |
9 |
triggered by storing instances of custom classes in a pickle. |
10 |
|
11 |
|
12 |
Modified: main/trunk/pym/portage/dbapi/vartree.py |
13 |
=================================================================== |
14 |
--- main/trunk/pym/portage/dbapi/vartree.py 2008-05-26 23:16:13 UTC (rev 10433) |
15 |
+++ main/trunk/pym/portage/dbapi/vartree.py 2008-05-26 23:22:15 UTC (rev 10434) |
16 |
@@ -602,8 +602,11 @@ |
17 |
self._aux_cache = mypickle.load() |
18 |
f.close() |
19 |
del f |
20 |
- except (IOError, OSError, EOFError, cPickle.UnpicklingError): |
21 |
- pass |
22 |
+ except (IOError, OSError, EOFError, cPickle.UnpicklingError), e: |
23 |
+ if isinstance(e, cPickle.UnpicklingError): |
24 |
+ writemsg("!!! Error loading '%s': %s\n" % \ |
25 |
+ (self._aux_cache_filename, str(e)), noiselevel=-1) |
26 |
+ del e |
27 |
if not self._aux_cache or \ |
28 |
not isinstance(self._aux_cache, dict) or \ |
29 |
self._aux_cache.get("version") != self._aux_cache_version or \ |
30 |
|
31 |
-- |
32 |
gentoo-commits@l.g.o mailing list |