diff options
author | Zac Medico <zmedico@gentoo.org> | 2008-07-03 21:52:56 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2008-07-03 21:52:56 +0000 |
commit | da4c1e25f54e4da4b2c5c80b5568a0c8c45cae50 (patch) | |
tree | 6cfc22ec9bd6d3582fd9538cfdb6a920336f0c0a | |
parent | 216e0d1372c85916dd17e1f472bbae2a384b9c72 (diff) | |
download | portage-da4c1e25f54e4da4b2c5c80b5568a0c8c45cae50.tar.gz portage-da4c1e25f54e4da4b2c5c80b5568a0c8c45cae50.tar.bz2 portage-da4c1e25f54e4da4b2c5c80b5568a0c8c45cae50.zip |
Bug #230579 - Handle EOFError raised from cPickle.load() in
PreservedLibsRegistry.load().
svn path=/main/trunk/; revision=10915
-rw-r--r-- | pym/portage/dbapi/vartree.py | 4 |
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) |