From 0654d66ccead49eb7d5edf2df189bfe77773b89e Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sun, 11 Dec 2011 00:15:16 -0800 Subject: [PATCH] data._init(): use 'portage' default in first call --- pym/portage/data.py | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/pym/portage/data.py b/pym/portage/data.py index a25b282ab..cf94ab0cd 100644 --- a/pym/portage/data.py +++ b/pym/portage/data.py @@ -184,12 +184,10 @@ def _init(settings): if '_portage_grpname' not in _initialized_globals and \ '_portage_username' not in _initialized_globals: - v = settings.get('PORTAGE_GRPNAME') - if v is not None: - globals()['_portage_grpname'] = v - _initialized_globals.add('_portage_grpname') - - v = settings.get('PORTAGE_USERNAME') - if v is not None: - globals()['_portage_username'] = v - _initialized_globals.add('_portage_username') + v = settings.get('PORTAGE_GRPNAME', 'portage') + globals()['_portage_grpname'] = v + _initialized_globals.add('_portage_grpname') + + v = settings.get('PORTAGE_USERNAME', 'portage') + globals()['_portage_username'] = v + _initialized_globals.add('_portage_username') -- 2.26.2