Fix RuntimeError in ec2_group_info (#65434)

Modifying dictionary while iterating over it
pull/65515/head
Aaryn 5 years ago committed by Jill R
parent fc54ae9227
commit be8fa961cf

@ -140,7 +140,7 @@ def main():
# Replace filter key underscores with dashes, for compatibility, except if we're dealing with tags
sanitized_filters = module.params.get("filters")
for key in sanitized_filters:
for key in list(sanitized_filters):
if not key.startswith("tag:"):
sanitized_filters[key.replace("_", "-")] = sanitized_filters.pop(key)

Loading…
Cancel
Save