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 E0920138334 for ; Sun, 18 Aug 2019 22:15:13 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D14C1E08DD; Sun, 18 Aug 2019 22:15:12 +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 B2BC6E08DD for ; Sun, 18 Aug 2019 22:15:12 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (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 EE19E349DC1 for ; Sun, 18 Aug 2019 22:15:10 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 5A3BA62A for ; Sun, 18 Aug 2019 22:15:08 +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: <1566165198.53801bfdd8037d1b0631412d56217207e43ff259.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: lib/portage/ X-VCS-Repository: proj/portage X-VCS-Files: lib/portage/exception.py X-VCS-Directories: lib/portage/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 53801bfdd8037d1b0631412d56217207e43ff259 X-VCS-Branch: master Date: Sun, 18 Aug 2019 22:15:08 +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: c2a6ec5d-5741-4e73-b8d2-1c7cd6011020 X-Archives-Hash: 1cdbd4dacdd2d51dfb0d3e14bc92cf7a commit: 53801bfdd8037d1b0631412d56217207e43ff259 Author: Zac Medico gentoo org> AuthorDate: Sun Aug 18 21:49:31 2019 +0000 Commit: Zac Medico gentoo org> CommitDate: Sun Aug 18 21:53:18 2019 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=53801bfd AmbiguousPackageName: initialize self.args for pypy compat For pypy 7.1 self.args is empty, triggering this IndexError: Traceback (most recent call last): File "", line 53, in File "/usr/lib/pypy2.7/site-packages/_emerge/main.py", line 1289, in emerge_main return run_action(emerge_config) File "/usr/lib/pypy2.7/site-packages/_emerge/actions.py", line 3230, in run_action emerge_config.args, spinner) File "/usr/lib/pypy2.7/site-packages/_emerge/actions.py", line 2081, in action_uninstall for i in e.args[0]: IndexError: tuple index out of range Bug: https://bugs.gentoo.org/692412 Signed-off-by: Zac Medico gentoo.org> lib/portage/exception.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/portage/exception.py b/lib/portage/exception.py index aed8beeb9..a1c3c5f17 100644 --- a/lib/portage/exception.py +++ b/lib/portage/exception.py @@ -1,4 +1,4 @@ -# Copyright 1998-2015 Gentoo Foundation +# Copyright 1998-2019 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 import signal @@ -149,6 +149,10 @@ class AmbiguousPackageName(ValueError, PortageException): to the existence of multiple matches in different categories. This inherits from ValueError, for backward compatibility with calling code that already handles ValueError.""" + def __init__(self, *args, **kwargs): + self.args = args + super(AmbiguousPackageName, self).__init__(*args, **kwargs) + def __str__(self): return ValueError.__str__(self)