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 513F5138824 for ; Thu, 23 Oct 2014 18:18:31 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 8CDBCE0807; Thu, 23 Oct 2014 18:18:30 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 40F94E0807 for ; Thu, 23 Oct 2014 18:18:30 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 290AC34051C for ; Thu, 23 Oct 2014 18:18:28 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 888F888DB for ; Thu, 23 Oct 2014 18:18: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: <1414088274.b26d3aad771a6ca177228ba984c3c98130e3c60a.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/ X-VCS-Repository: proj/portage X-VCS-Files: pym/portage/data.py X-VCS-Directories: pym/portage/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: b26d3aad771a6ca177228ba984c3c98130e3c60a X-VCS-Branch: master Date: Thu, 23 Oct 2014 18:18: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-Archives-Salt: 10a1c5c5-c4eb-4846-b9c4-e9201d31a13a X-Archives-Hash: 478c1589870dceef3338e496157606d2 commit: b26d3aad771a6ca177228ba984c3c98130e3c60a Author: Zac Medico gentoo org> AuthorDate: Thu Oct 23 18:17:54 2014 +0000 Commit: Zac Medico gentoo org> CommitDate: Thu Oct 23 18:17:54 2014 +0000 URL: http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=b26d3aad portage.data._get_global: fix UnboundLocalError Since commit 1364fcd89384c9f60e6d72d7057dc00d8caba175, an UnboundLocalError was triggered for portage_gid when userpriv was enabled. This is fixed by using _get_global('portage_gid') to access the variable value. Fixes: 1364fcd89384 ("Support unprivileged mode for bug #433453.") X-Gentoo-Bug: 433453 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=433453 --- pym/portage/data.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pym/portage/data.py b/pym/portage/data.py index 3d91e48..3e03eef 100644 --- a/pym/portage/data.py +++ b/pym/portage/data.py @@ -157,7 +157,7 @@ def _get_global(k): raise AssertionError('unknown name: %s' % k) elif k == 'userpriv_groups': - v = [portage_gid] + v = [_get_global('portage_gid')] if secpass >= 2: # Get a list of group IDs for the portage user. Do not use # grp.getgrall() since it is known to trigger spurious