mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #42798 from s-sebastian/2016.11
Update return data before calling returners
This commit is contained in:
commit
b9f4f87aa5
1 changed files with 6 additions and 6 deletions
|
@ -849,6 +849,12 @@ class Schedule(object):
|
|||
|
||||
ret['return'] = self.functions[func](*args, **kwargs)
|
||||
|
||||
# runners do not provide retcode
|
||||
if 'retcode' in self.functions.pack['__context__']:
|
||||
ret['retcode'] = self.functions.pack['__context__']['retcode']
|
||||
|
||||
ret['success'] = True
|
||||
|
||||
data_returner = data.get('returner', None)
|
||||
if data_returner or self.schedule_returner:
|
||||
if 'return_config' in data:
|
||||
|
@ -865,7 +871,6 @@ class Schedule(object):
|
|||
for returner in OrderedDict.fromkeys(rets):
|
||||
ret_str = '{0}.returner'.format(returner)
|
||||
if ret_str in self.returners:
|
||||
ret['success'] = True
|
||||
self.returners[ret_str](ret)
|
||||
else:
|
||||
log.info(
|
||||
|
@ -874,11 +879,6 @@ class Schedule(object):
|
|||
)
|
||||
)
|
||||
|
||||
# runners do not provide retcode
|
||||
if 'retcode' in self.functions.pack['__context__']:
|
||||
ret['retcode'] = self.functions.pack['__context__']['retcode']
|
||||
|
||||
ret['success'] = True
|
||||
except Exception:
|
||||
log.exception("Unhandled exception running {0}".format(ret['fun']))
|
||||
# Although catch-all exception handlers are bad, the exception here
|
||||
|
|
Loading…
Add table
Reference in a new issue