mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
Merge pull request #37502 from cachedout/issue_37444
Log proper message on returners that cannot be loaded
This commit is contained in:
commit
4b6f1ab1c4
@ -1458,9 +1458,13 @@ class Minion(MinionBase):
|
||||
ret['id'] = opts['id']
|
||||
for returner in set(data['ret'].split(',')):
|
||||
try:
|
||||
minion_instance.returners['{0}.returner'.format(
|
||||
returner
|
||||
)](ret)
|
||||
returner_str = '{0}.returner'.format(returner)
|
||||
if returner_str in minion_instance.returners:
|
||||
minion_instance.returners[returner_str](ret)
|
||||
else:
|
||||
returner_err = minion_instance.returners.missing_fun_string(returner_str)
|
||||
log.error('Returner {0} could not be loaded: {1}'.format(
|
||||
returner_str, returner_err))
|
||||
except Exception as exc:
|
||||
log.error(
|
||||
'The return failed for job {0} {1}'.format(
|
||||
|
Loading…
Reference in New Issue
Block a user