update all returner refs to use the new format

Since gen_functions returns full strings we need to look up the
returner functions differently
This commit is contained in:
Thomas S Hatch 2012-10-31 12:59:06 -06:00
parent 8d87a200ff
commit fd35a3c505
2 changed files with 7 additions and 3 deletions

View File

@ -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

View File

@ -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(