mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
Misc other loader globals fixes
This commit is contained in:
parent
02e219e452
commit
9d31b1bcc3
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user