From fd35a3c505020a3bece970ebe9a7db3b1e3dd844 Mon Sep 17 00:00:00 2001 From: Thomas S Hatch Date: Wed, 31 Oct 2012 12:59:06 -0600 Subject: [PATCH] update all returner refs to use the new format Since gen_functions returns full strings we need to look up the returner functions differently --- salt/cli/caller.py | 2 +- salt/minion.py | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/salt/cli/caller.py b/salt/cli/caller.py index 069fbd71a9..af7c0127df 100644 --- a/salt/cli/caller.py +++ b/salt/cli/caller.py @@ -76,7 +76,7 @@ class Caller(object): ret['jid'] = '{0:%Y%m%d%H%M%S%f}'.format(datetime.datetime.now()) for returner in self.opts['return'].split(','): try: - self.minion.returners[returner](ret) + self.minion.returners['{0}.returner'.format(returner)](ret) except Exception as exc: pass return ret diff --git a/salt/minion.py b/salt/minion.py index 21b9e7287b..f8d638f7cf 100644 --- a/salt/minion.py +++ b/salt/minion.py @@ -331,7 +331,9 @@ class Minion(object): for returner in set(data['ret'].split(',')): ret['id'] = opts['id'] try: - minion_instance.returners[returner](ret) + minion_instance.returners['{0}.returner'.format( + returner + )](ret) except Exception as exc: log.error( 'The return failed for job {0} {1}'.format( @@ -387,7 +389,9 @@ class Minion(object): for returner in set(data['ret'].split(',')): ret['id'] = opts['id'] try: - minion_instance.returners[returner](ret) + minion_instance.returners['{0}.returner'.format( + returner + )](ret) except Exception as exc: log.error( 'The return failed for job {0} {1}'.format(