Misc other loader globals fixes

This commit is contained in:
Thomas Jackson 2015-02-02 08:53:51 -08:00
parent 02e219e452
commit 9d31b1bcc3

View File

@ -256,10 +256,13 @@ def auth(opts, whitelist=None):
'''
Returns the auth modules
'''
pack = {'name': '__salt__',
'value': minion_mods(opts)}
return NewLazyLoader(_module_dirs(opts, 'auth', 'auth'),
opts,
tag='auth',
whitelist=whitelist,
pack=pack,
)
@ -684,16 +687,15 @@ class FilterDictWrapper(MutableMapping):
del self._dict[key]
def __getitem__(self, key):
'''
'''
key = key + self.suffix
return self._dict[key]
return self._dict[key + self.suffix]
def __len__(self):
return len(self._dict)
def __iter__(self):
return iter(self._dict)
for key in self._dict:
if key.endswith(self.suffix):
yield key.replace(self.suffix, '')
class NewLazyLoader(salt.utils.lazy.LazyDict):