summaryrefslogtreecommitdiffstats
path: root/pym/portage/dbapi
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2012-09-28 19:36:17 -0700
committerZac Medico <zmedico@gentoo.org>2012-09-28 19:36:17 -0700
commit2377357f4e0164d338c1249c79f479229aa7c0e4 (patch)
tree5a46d400aa9c72a0df395ea6b3c5428e567c2564 /pym/portage/dbapi
parentd5ec77f886ba5891de2d2dcc25700327596df588 (diff)
downloadportage-2377357f4e0164d338c1249c79f479229aa7c0e4.tar.gz
portage-2377357f4e0164d338c1249c79f479229aa7c0e4.tar.bz2
portage-2377357f4e0164d338c1249c79f479229aa7c0e4.zip
Handle KeyError when loading pickles.
See http://forums.gentoo.org/viewtopic-t-938022.html for example.
Diffstat (limited to 'pym/portage/dbapi')
-rw-r--r--pym/portage/dbapi/vartree.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py
index f8980f7a0..5299b298f 100644
--- a/pym/portage/dbapi/vartree.py
+++ b/pym/portage/dbapi/vartree.py
@@ -585,7 +585,9 @@ class vardbapi(dbapi):
aux_cache = mypickle.load()
f.close()
del f
- except (AttributeError, EOFError, EnvironmentError, ValueError, pickle.UnpicklingError) as e:
+ except (SystemExit, KeyboardInterrupt):
+ raise
+ except Exception as e:
if isinstance(e, EnvironmentError) and \
getattr(e, 'errno', None) in (errno.ENOENT, errno.EACCES):
pass