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 49D3F139694 for ; Wed, 12 Apr 2017 16:46:46 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5A8ECE0CD8; Wed, 12 Apr 2017 16:46:43 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 3B573E0CD8 for ; Wed, 12 Apr 2017 16:46:43 +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 24A9D340988 for ; Wed, 12 Apr 2017 16:46:42 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id DC14273EF for ; Wed, 12 Apr 2017 16:46:39 +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: <1492015432.e9cd44dbd0366267b8b6beb011d91a9f99fed3cd.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/_emerge/ X-VCS-Repository: proj/portage X-VCS-Files: pym/_emerge/actions.py X-VCS-Directories: pym/_emerge/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: e9cd44dbd0366267b8b6beb011d91a9f99fed3cd X-VCS-Branch: master Date: Wed, 12 Apr 2017 16:46:39 +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: 1cd94972-b7f3-4782-a572-be49fbcc5afe X-Archives-Hash: 6348f3eded5edfa9ae07e5fb470be38a commit: e9cd44dbd0366267b8b6beb011d91a9f99fed3cd Author: Peter Foley pefoley com> AuthorDate: Wed Apr 12 06:48:48 2017 +0000 Commit: Zac Medico gentoo org> CommitDate: Wed Apr 12 16:43:52 2017 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=e9cd44db Prevent crash if os.nice() fails If settings["PORTAGE_NICENESS"] is undefined, portage crashes with a KeyError when trying to print the error. Signed-off-by: Peter Foley pefoley.com> X-Gentoo-bug: 615328 X-Gentoo-bug-url: https://bugs.gentoo.org/show_bug.cgi?id=615328 pym/_emerge/actions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py index 818fab90a..1bc20c3ed 100644 --- a/pym/_emerge/actions.py +++ b/pym/_emerge/actions.py @@ -2553,7 +2553,7 @@ def nice(settings): except (OSError, ValueError) as e: out = portage.output.EOutput() out.eerror("Failed to change nice value to '%s'" % \ - settings["PORTAGE_NICENESS"]) + settings.get("PORTAGE_NICENESS", "0")) out.eerror("%s\n" % str(e)) def ionice(settings):