From: Zac Medico Date: Fri, 9 Dec 2011 23:23:16 +0000 (-0800) Subject: data.py: grp/pwd struct attrs, not indexes X-Git-Tag: v2.2.0_alpha80~41 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=10689f11f50a5452dc7f2ead53aef998657a2917;p=portage.git data.py: grp/pwd struct attrs, not indexes --- diff --git a/pym/portage/data.py b/pym/portage/data.py index fa6970c42..fe390a130 100644 --- a/pym/portage/data.py +++ b/pym/portage/data.py @@ -86,8 +86,8 @@ def _get_global(k): secpass = 2 #Discover the uid and gid of the portage user/group try: - portage_uid = pwd.getpwnam(_get_global('_portage_uname'))[2] - portage_gid = grp.getgrnam(_get_global('_portage_grpname'))[2] + portage_uid = pwd.getpwnam(_get_global('_portage_uname')).pw_uid + portage_gid = grp.getgrnam(_get_global('_portage_grpname')).gr_gid if secpass < 1 and portage_gid in os.getgroups(): secpass = 1 except KeyError: