From 2377357f4e0164d338c1249c79f479229aa7c0e4 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Fri, 28 Sep 2012 19:36:17 -0700 Subject: Handle KeyError when loading pickles. See http://forums.gentoo.org/viewtopic-t-938022.html for example. --- pym/portage/getbinpkg.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'pym/portage/getbinpkg.py') diff --git a/pym/portage/getbinpkg.py b/pym/portage/getbinpkg.py index 34a5e0efe..538f8c23c 100644 --- a/pym/portage/getbinpkg.py +++ b/pym/portage/getbinpkg.py @@ -559,7 +559,9 @@ def dir_get_metadata(baseurl, conn=None, chunk_size=3000, verbose=1, usingcache= out.write(_("Loaded metadata pickle.\n")) out.flush() metadatafile.close() - except (AttributeError, EOFError, EnvironmentError, ValueError, pickle.UnpicklingError): + except (SystemExit, KeyboardInterrupt): + raise + except Exception: metadata = {} if baseurl not in metadata: metadata[baseurl]={} -- cgit v1.2.3-1-g7c22