mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
Fix exception casting bug, pass id to dynamic returners
This commit is contained in:
parent
cf7b0e8499
commit
149c7fae92
@ -283,11 +283,12 @@ class Minion(object):
|
||||
ret['return'] = exc
|
||||
ret['jid'] = data['jid']
|
||||
if data['ret']:
|
||||
ret['id'] = self.opts['id']
|
||||
try:
|
||||
self.returners[data['ret']](ret)
|
||||
except Exception as exc:
|
||||
self.opts['logger'].error('The return failed for job'\
|
||||
+ data['jid'] + ' ' + exc)
|
||||
+ data['jid'] + ' ' + str(exc))
|
||||
else:
|
||||
self._return_pub(ret)
|
||||
|
||||
@ -313,11 +314,12 @@ class Minion(object):
|
||||
ret['return'][data['fun'][ind]] = exc
|
||||
ret['jid'] = data['jid']
|
||||
if data['ret']:
|
||||
ret['id'] = self.opts['id']
|
||||
try:
|
||||
self.returners[data['ret']](ret)
|
||||
except Exception as exc:
|
||||
self.opts['logger'].error('The return failed for job'\
|
||||
+ data['jid'] + ' ' + exc)
|
||||
+ data['jid'] + ' ' + str(exc))
|
||||
else:
|
||||
self._return_pub(ret)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user