mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
check_result: Correctly check the __extend__ state.
https://github.com/saltstack/salt/issues/42512 check_state_result() is expecting each highstate item to be a dict, but states using extend are lists. Conflicts: - salt/utils/state.py
This commit is contained in:
parent
1643bb7fd4
commit
f81bb61f2d
1 changed files with 5 additions and 1 deletions
|
@ -2016,7 +2016,11 @@ def check_state_result(running, recurse=False, highstate=None):
|
|||
|
||||
ret = True
|
||||
for state_id, state_result in six.iteritems(running):
|
||||
if not recurse and not isinstance(state_result, dict):
|
||||
expected_type = dict
|
||||
# The __extend__ state is a list
|
||||
if "__extend__" == state_id:
|
||||
expected_type = list
|
||||
if not recurse and not isinstance(state_result, expected_type):
|
||||
ret = False
|
||||
if ret and isinstance(state_result, dict):
|
||||
result = state_result.get('result', _empty)
|
||||
|
|
Loading…
Add table
Reference in a new issue