[cloud] Don't alter dictionary during iteration in elb_target_group_facts, avoiding RuntimeError (#30247)
Don't update the target_group_attributes dict while iterating over it. Fixes #30190
This commit is contained in:
parent
ba6d592039
commit
fd18d7ebb5
1 changed files with 2 additions and 5 deletions
|
@ -184,11 +184,8 @@ def get_target_group_attributes(connection, module, target_group_arn):
|
||||||
module.fail_json(msg=e.message, exception=traceback.format_exc(), **camel_dict_to_snake_dict(e.response))
|
module.fail_json(msg=e.message, exception=traceback.format_exc(), **camel_dict_to_snake_dict(e.response))
|
||||||
|
|
||||||
# Replace '.' with '_' in attribute key names to make it more Ansibley
|
# Replace '.' with '_' in attribute key names to make it more Ansibley
|
||||||
for k, v in target_group_attributes.items():
|
return dict((k.replace('.', '_'), v)
|
||||||
target_group_attributes[k.replace('.', '_')] = v
|
for (k, v) in target_group_attributes.items())
|
||||||
del target_group_attributes[k]
|
|
||||||
|
|
||||||
return target_group_attributes
|
|
||||||
|
|
||||||
|
|
||||||
def get_target_group_tags(connection, module, target_group_arn):
|
def get_target_group_tags(connection, module, target_group_arn):
|
||||||
|
|
Loading…
Reference in a new issue