From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 0B1CD138359 for ; Wed, 22 Jul 2020 20:14:30 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 26DA1E088D; Wed, 22 Jul 2020 20:14:29 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 0A885E088D for ; Wed, 22 Jul 2020 20:14:29 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id A03B734F11A for ; Wed, 22 Jul 2020 20:14:27 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 22E8B2E5 for ; Wed, 22 Jul 2020 20:14:26 +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: <1595448736.309f2cc59e19eab05dfc2e86d1df4fc7ba1be93d.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: lib/portage/dbapi/ X-VCS-Repository: proj/portage X-VCS-Files: lib/portage/dbapi/_MergeProcess.py X-VCS-Directories: lib/portage/dbapi/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 309f2cc59e19eab05dfc2e86d1df4fc7ba1be93d X-VCS-Branch: master Date: Wed, 22 Jul 2020 20:14:26 +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-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 0b5c369c-2c1b-4e26-862c-bee82a70d745 X-Archives-Hash: 8746acd6bdbc1e292a1214f486ce0fa2 commit: 309f2cc59e19eab05dfc2e86d1df4fc7ba1be93d Author: Zac Medico gentoo org> AuthorDate: Wed Jul 22 20:10:30 2020 +0000 Commit: Zac Medico gentoo org> CommitDate: Wed Jul 22 20:12:16 2020 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=309f2cc5 MergeProcess: handle cancelled future in _proc_join_done If the future was cancelled, then avoid a possible ValueError when accessing proc.exitcode. Fixes: f587ebf3d492 ("MergeProcess: handle RETURNCODE_POSTINST_FAILURE in _proc_join_done") Signed-off-by: Zac Medico gentoo.org> lib/portage/dbapi/_MergeProcess.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/portage/dbapi/_MergeProcess.py b/lib/portage/dbapi/_MergeProcess.py index 85deedc18..e89b53555 100644 --- a/lib/portage/dbapi/_MergeProcess.py +++ b/lib/portage/dbapi/_MergeProcess.py @@ -199,7 +199,7 @@ class MergeProcess(ForkProcess): """ Extend _proc_join_done to react to RETURNCODE_POSTINST_FAILURE. """ - if proc.exitcode == portage.const.RETURNCODE_POSTINST_FAILURE: + if not future.cancelled() and proc.exitcode == portage.const.RETURNCODE_POSTINST_FAILURE: self.postinst_failure = True self.returncode = os.EX_OK super(MergeProcess, self)._proc_join_done(proc, future)