_get_global: fix up late night screwup
authorFabian Groffen <grobian@gentoo.org>
Sat, 10 Dec 2011 12:12:17 +0000 (13:12 +0100)
committerFabian Groffen <grobian@gentoo.org>
Sat, 10 Dec 2011 12:12:17 +0000 (13:12 +0100)
pym/portage/data.py

index 196e5dc95996a44ada21bbb7ef869b106ace4a77..e25b545ea68b945dd5ae74fc18472ec0a7fa107c 100644 (file)
@@ -155,10 +155,10 @@ def _get_global(k):
                v = env.get('PORTAGE_GRPNAME', PORTAGE_GROUPNAME)
                # END PREFIX LOCAL
        elif k == '_portage_uname':
+               env = getattr(portage, 'settings', os.environ)
                # PREFIX LOCAL: use var iso hardwired 'portage'
-               env = getattr(portage, 'settings', PORTAGE_USERNAME)
+               v = env.get('PORTAGE_USERNAME', PORTAGE_USERNAME)
                # END PREFIX LOCAL
-               v = env.get('PORTAGE_USERNAME', 'portage')
        else:
                raise AssertionError('unknown name: %s' % k)