diff --git a/salt/loader.py b/salt/loader.py index 7040e66dac..89c26bd48c 100644 --- a/salt/loader.py +++ b/salt/loader.py @@ -73,12 +73,14 @@ def raw_mod(opts, name, functions): return load.gen_module(name, functions) -def returners(opts): +def returners(opts, functions): ''' Returns the returner modules ''' load = _create_loader(opts, 'returners', 'returner') - return load.filter_func('returner') + pack = {'name': '__salt__', + 'value': functions} + return load.filter_func('returner', pack) def pillars(opts, functions): diff --git a/salt/minion.py b/salt/minion.py index e28517412d..e8da79d1c6 100644 --- a/salt/minion.py +++ b/salt/minion.py @@ -109,7 +109,7 @@ class SMinion(object): self.opts['environment'], ).compile_pillar() self.functions = salt.loader.minion_mods(self.opts) - self.returners = salt.loader.returners(self.opts) + self.returners = salt.loader.returners(self.opts, self.functions) self.states = salt.loader.states(self.opts, self.functions) self.rend = salt.loader.render(self.opts, self.functions) self.matcher = Matcher(self.opts, self.functions) @@ -161,7 +161,7 @@ class Minion(object): ''' self.opts['grains'] = salt.loader.grains(self.opts) functions = salt.loader.minion_mods(self.opts) - returners = salt.loader.returners(self.opts) + returners = salt.loader.returners(self.opts, functions) return functions, returners def _handle_payload(self, payload):