mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 01:18:58 +00:00
Indicate success to returner modules [GH-1792]
This commit is contained in:
parent
0195b360a1
commit
05f5000c46
@ -275,10 +275,12 @@ class Minion(object):
|
||||
|
||||
function_name = data['fun']
|
||||
if function_name in self.functions:
|
||||
ret['success'] = False
|
||||
try:
|
||||
func = self.functions[data['fun']]
|
||||
args, kw = detect_kwargs(func, data['arg'], data)
|
||||
ret['return'] = func(*args, **kw)
|
||||
ret['success'] = True
|
||||
except CommandNotFoundError as exc:
|
||||
msg = 'Command required for \'{0}\' not found: {1}'
|
||||
log.debug(msg.format(function_name, str(exc)))
|
||||
@ -334,10 +336,12 @@ class Minion(object):
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
ret['success'][data['fun'][ind]] = False
|
||||
try:
|
||||
func = self.functions[data['fun'][ind]]
|
||||
args, kw = detect_kwargs(func, data['arg'][ind], data)
|
||||
ret['return'][data['fun'][ind]] = func(*args, **kw)
|
||||
ret['success'][data['fun'][ind]] = True
|
||||
except Exception as exc:
|
||||
trb = traceback.format_exc()
|
||||
log.warning(
|
||||
|
Loading…
Reference in New Issue
Block a user