mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-01 00:03:10 +00:00
Avoid KeyError when subnet['Tags'] doesn't exist (#30349)
The problem was introduced in 2cdf31d3.
This commit is contained in:
committed by
Will Thames
parent
4c9ad00c50
commit
524c5dcfef
@@ -215,7 +215,7 @@ def describe_subnets(connection, module):
|
||||
subnet['id'] = subnet['SubnetId']
|
||||
subnet_info.append(camel_dict_to_snake_dict(subnet))
|
||||
# convert tag list to ansible dict
|
||||
subnet_info[-1]['tags'] = boto3_tag_list_to_ansible_dict(subnet['Tags'])
|
||||
subnet_info[-1]['tags'] = boto3_tag_list_to_ansible_dict(subnet.get('Tags', []))
|
||||
|
||||
module.exit_json(subnets=subnet_info)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user