mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 21:00:22 -07:00
Fixes map call usage
For the comparisions that need to be done, this map call needs to convert to a list because the six import in ansible changes the behavior of map to return an iterator instead of a list
This commit is contained in:
parent
f84f97d035
commit
362c86d323
1 changed files with 1 additions and 1 deletions
|
@ -250,7 +250,7 @@ def set_rules(api, name, rules_list):
|
||||||
return False
|
return False
|
||||||
rules_list = list(enumerate(rules_list))
|
rules_list = list(enumerate(rules_list))
|
||||||
try:
|
try:
|
||||||
current_rules = map(lambda x: (x['priority'], x['rule_name']), get_rules(api, name))
|
current_rules = [(x['priority'], x['rule_name']) for x in get_rules(api, name)]
|
||||||
to_add_rules = []
|
to_add_rules = []
|
||||||
for i, x in rules_list:
|
for i, x in rules_list:
|
||||||
if (i, x) not in current_rules:
|
if (i, x) not in current_rules:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue