From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 500AE138010 for ; Sat, 29 Sep 2012 02:36:43 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 72E26E075F; Sat, 29 Sep 2012 02:36:35 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 3A439E075F for ; Sat, 29 Sep 2012 02:36:35 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 6AD2B33CEF6 for ; Sat, 29 Sep 2012 02:36:34 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 498F5E544A for ; Sat, 29 Sep 2012 02:36:32 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <1348886177.2377357f4e0164d338c1249c79f479229aa7c0e4.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/dbapi/, pym/portage/, pym/_emerge/ X-VCS-Repository: proj/portage X-VCS-Files: pym/_emerge/BlockerCache.py pym/portage/dbapi/vartree.py pym/portage/getbinpkg.py X-VCS-Directories: pym/portage/dbapi/ pym/portage/ pym/_emerge/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 2377357f4e0164d338c1249c79f479229aa7c0e4 X-VCS-Branch: master Date: Sat, 29 Sep 2012 02:36:32 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: f852662e-0a8f-4beb-b782-fe500007fe4f X-Archives-Hash: 8807060fc8b524034baf4925d505f0d1 commit: 2377357f4e0164d338c1249c79f479229aa7c0e4 Author: Zac Medico gentoo org> AuthorDate: Sat Sep 29 02:36:17 2012 +0000 Commit: Zac Medico gentoo org> CommitDate: Sat Sep 29 02:36:17 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=2377357f Handle KeyError when loading pickles. See http://forums.gentoo.org/viewtopic-t-938022.html for example. --- pym/_emerge/BlockerCache.py | 4 +++- pym/portage/dbapi/vartree.py | 4 +++- pym/portage/getbinpkg.py | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/pym/_emerge/BlockerCache.py b/pym/_emerge/BlockerCache.py index fce81f8..9195524 100644 --- a/pym/_emerge/BlockerCache.py +++ b/pym/_emerge/BlockerCache.py @@ -62,7 +62,9 @@ class BlockerCache(portage.cache.mappings.MutableMapping): self._cache_data = 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 diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py index f8980f7..5299b29 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 diff --git a/pym/portage/getbinpkg.py b/pym/portage/getbinpkg.py index 34a5e0e..538f8c2 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]={}