mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Fix 'success' value for wheel commands
The ClearFuncs was assuming a 'success' of True 100% of the time for wheel functions. This causes wheel funcs executed via salt-api (and probably elsewhere) to incorrectly report the 'success' field when the wheel function triggers a traceback (such as when required positional arguments are not passed). Resolves #38540
This commit is contained in:
parent
405d86a2ca
commit
bd4474fa62
1 changed files with 3 additions and 3 deletions
|
@ -1805,9 +1805,9 @@ class ClearFuncs(object):
|
|||
'user': token['name']}
|
||||
try:
|
||||
self.event.fire_event(data, tagify([jid, 'new'], 'wheel'))
|
||||
ret = self.wheel_.call_func(fun, **clear_load)
|
||||
data['return'] = ret
|
||||
data['success'] = True
|
||||
ret = self.wheel_.call_func(fun, full_return=True, **clear_load)
|
||||
data['return'] = ret['return']
|
||||
data['success'] = ret['success']
|
||||
self.event.fire_event(data, tagify([jid, 'ret'], 'wheel'))
|
||||
return {'tag': tag,
|
||||
'data': data}
|
||||
|
|
Loading…
Add table
Reference in a new issue