summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pym/portage/dbapi/vartree.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py
index 095d29901..f2761d63f 100644
--- a/pym/portage/dbapi/vartree.py
+++ b/pym/portage/dbapi/vartree.py
@@ -52,8 +52,8 @@ class PreservedLibsRegistry(object):
""" Reload the registry data from file """
try:
self._data = cPickle.load(open(self._filename, "r"))
- except IOError, e:
- if e.errno == errno.ENOENT:
+ except (EOFError, IOError), e:
+ if isintance(e, EOFError) or e.errno == errno.ENOENT:
self._data = {}
elif e.errno == PermissionDenied.errno:
raise PermissionDenied(self._filename)