1 |
Author: zmedico |
2 |
Date: 2008-07-03 21:52:56 +0000 (Thu, 03 Jul 2008) |
3 |
New Revision: 10915 |
4 |
|
5 |
Modified: |
6 |
main/trunk/pym/portage/dbapi/vartree.py |
7 |
Log: |
8 |
Bug #230579 - Handle EOFError raised from cPickle.load() in |
9 |
PreservedLibsRegistry.load(). |
10 |
|
11 |
|
12 |
Modified: main/trunk/pym/portage/dbapi/vartree.py |
13 |
=================================================================== |
14 |
--- main/trunk/pym/portage/dbapi/vartree.py 2008-07-03 17:05:34 UTC (rev 10914) |
15 |
+++ main/trunk/pym/portage/dbapi/vartree.py 2008-07-03 21:52:56 UTC (rev 10915) |
16 |
@@ -52,8 +52,8 @@ |
17 |
""" Reload the registry data from file """ |
18 |
try: |
19 |
self._data = cPickle.load(open(self._filename, "r")) |
20 |
- except IOError, e: |
21 |
- if e.errno == errno.ENOENT: |
22 |
+ except (EOFError, IOError), e: |
23 |
+ if isintance(e, EOFError) or e.errno == errno.ENOENT: |
24 |
self._data = {} |
25 |
elif e.errno == PermissionDenied.errno: |
26 |
raise PermissionDenied(self._filename) |
27 |
|
28 |
-- |
29 |
gentoo-commits@l.g.o mailing list |