From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1RxV8B-0001yr-IO for garchives@archives.gentoo.org; Wed, 15 Feb 2012 03:02:07 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E9A1CE091D; Wed, 15 Feb 2012 03:01:58 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id B488CE091D for ; Wed, 15 Feb 2012 03:01:58 +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 3076B1B4004 for ; Wed, 15 Feb 2012 03:01:57 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id E1E97E53FE for ; Wed, 15 Feb 2012 03:01:55 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <1329274876.a16c54c0d5b891655bce89e5779e6b9221131ba7.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/_emerge/ X-VCS-Repository: proj/portage X-VCS-Files: pym/_emerge/Scheduler.py X-VCS-Directories: pym/_emerge/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: a16c54c0d5b891655bce89e5779e6b9221131ba7 X-VCS-Branch: master Date: Wed, 15 Feb 2012 03:01:55 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 64dd7268-2ce9-4b30-8e37-012292ec553e X-Archives-Hash: ea2522f5451592d3cc733379c989d719 commit: a16c54c0d5b891655bce89e5779e6b9221131ba7 Author: Zac Medico gentoo org> AuthorDate: Wed Feb 15 03:01:16 2012 +0000 Commit: Zac Medico gentoo org> CommitDate: Wed Feb 15 03:01:16 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3Da16c54c0 Scheduler: PyPy WeakValueDictionary.pop KeyError KeyError observed from WeakValueDictionary.pop() with PyPy 1.8, despite None given as default. Note that PyPy 1.8 has the same WeakValueDictionary code as CPython 2.7, so it may be possible for CPython to raise KeyError here as well. --- pym/_emerge/Scheduler.py | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/pym/_emerge/Scheduler.py b/pym/_emerge/Scheduler.py index 4b37026..c797c32 100644 --- a/pym/_emerge/Scheduler.py +++ b/pym/_emerge/Scheduler.py @@ -1620,7 +1620,14 @@ class Scheduler(PollScheduler): "installed", pkg.root_config, installed=3DTrue, operation=3D"uninstall") =20 - prefetcher =3D self._prefetchers.pop(pkg, None) + try: + prefetcher =3D self._prefetchers.pop(pkg, None) + except KeyError: + # KeyError observed with PyPy 1.8, despite None given as default. + # Note that PyPy 1.8 has the same WeakValueDictionary code as + # CPython 2.7, so it may be possible for CPython to raise KeyError + # here as well. + prefetcher =3D None if prefetcher is not None and not prefetcher.isAlive(): try: self._task_queues.fetch._task_queue.remove(prefetcher)