Fix RuntimeError in ec2_group_info (#65434)

Modifying dictionary while iterating over it
This commit is contained in:
Aaryn 2019-12-05 09:50:06 +13:00 committed by Jill R
parent fc54ae9227
commit be8fa961cf

View file

@ -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)