mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Assign 'return' to 'ret' if necessary in saltmod.function
This commit is contained in:
parent
34ff989d66
commit
de052e7135
1 changed files with 2 additions and 0 deletions
|
@ -404,6 +404,8 @@ def function(
|
|||
if mdata.get('failed', False):
|
||||
m_func = False
|
||||
else:
|
||||
if 'return' in mdata and 'ret' not in mdata:
|
||||
mdata['ret'] = mdata.pop('return')
|
||||
m_ret = mdata['ret']
|
||||
m_func = (not fail_function and True) or __salt__[fail_function](m_ret)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue