Avoid KeyError when subnet['Tags'] doesn't exist (#30349)
The problem was introduced in 2cdf31d3
.
This commit is contained in:
parent
4c9ad00c50
commit
524c5dcfef
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in a new issue