diff options
author | Zac Medico <zmedico@gentoo.org> | 2014-10-23 11:17:54 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2014-10-23 11:17:54 -0700 |
commit | b26d3aad771a6ca177228ba984c3c98130e3c60a (patch) | |
tree | 3fc014e502ba75c21d33af630af633d686ca452c | |
parent | Remove g+w bit from $T for TPE bug #519566 (diff) | |
download | portage-b26d3aad771a6ca177228ba984c3c98130e3c60a.tar.gz portage-b26d3aad771a6ca177228ba984c3c98130e3c60a.tar.bz2 portage-b26d3aad771a6ca177228ba984c3c98130e3c60a.zip |
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
-rw-r--r-- | pym/portage/data.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pym/portage/data.py b/pym/portage/data.py index 3d91e48e6..3e03eef42 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 |