mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Skip __exclude__ in find_sls_ids
The corresponding value would be a list and thus raises a TypeError when attempting to perform a dict lookup.
This commit is contained in:
parent
a2ed8cbb7f
commit
28a7d2b81c
1 changed files with 15 additions and 5 deletions
|
@ -243,11 +243,21 @@ def find_sls_ids(sls, high):
|
|||
'''
|
||||
ret = []
|
||||
for nid, item in six.iteritems(high):
|
||||
if item['__sls__'] == sls:
|
||||
for st_ in item:
|
||||
if st_.startswith('__'):
|
||||
continue
|
||||
ret.append((nid, st_))
|
||||
try:
|
||||
sls_tgt = item['__sls__']
|
||||
except TypeError:
|
||||
if nid != '__exclude__':
|
||||
log.error(
|
||||
'Invalid non-dict item \'%s\' in high data. Value: %r',
|
||||
nid, item
|
||||
)
|
||||
continue
|
||||
else:
|
||||
if sls_tgt == sls:
|
||||
for st_ in item:
|
||||
if st_.startswith('__'):
|
||||
continue
|
||||
ret.append((nid, st_))
|
||||
return ret
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue