mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Fix broken state orchestration
This corrects an issue introduced in #28012 wherein the `m_ret` variable was not set prior to evaluation. Here, we simply set it to None and then check for this type explicitely. Fixes #29110
This commit is contained in:
parent
200e771efb
commit
4b9302d794
1 changed files with 2 additions and 1 deletions
|
@ -248,6 +248,7 @@ def state(
|
|||
if 'return' in mdata and 'ret' not in mdata:
|
||||
mdata['ret'] = mdata.pop('return')
|
||||
|
||||
m_state = None
|
||||
if mdata.get('failed', False):
|
||||
m_state = False
|
||||
else:
|
||||
|
@ -255,7 +256,7 @@ def state(
|
|||
m_ret = mdata['ret']
|
||||
except KeyError:
|
||||
m_state = False
|
||||
if not m_state:
|
||||
if m_state is None:
|
||||
m_state = salt.utils.check_state_result(m_ret)
|
||||
|
||||
if not m_state:
|
||||
|
|
Loading…
Add table
Reference in a new issue