From 9d31b1bcc351fc8c5c2f09a6c110c9759226c9e6 Mon Sep 17 00:00:00 2001 From: Thomas Jackson Date: Mon, 2 Feb 2015 08:53:51 -0800 Subject: [PATCH] Misc other loader globals fixes --- salt/loader.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/salt/loader.py b/salt/loader.py index 4ca2da8702..51c225cdce 100644 --- a/salt/loader.py +++ b/salt/loader.py @@ -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):