ec2_vpc_dhcp_options_facts: if tags don't exist set them to default list instead of crashing - fixes #23825 (#23967)

* if tags don't exist set them to an empty list

* dhcp_option will always have a name tag

* make requested change
pull/23108/head
Sloane Hertel 8 years ago committed by Will Thames
parent 0154f32fbd
commit 338bf0fd3f

@ -100,7 +100,7 @@ except ImportError:
def get_dhcp_options_info(dhcp_option):
dhcp_option_info = {'DhcpOptionsId': dhcp_option['DhcpOptionsId'],
'DhcpConfigurations': dhcp_option['DhcpConfigurations'],
'Tags': boto3_tag_list_to_ansible_dict(dhcp_option['Tags'])}
'Tags': boto3_tag_list_to_ansible_dict(dhcp_option.get('Tags', [{'Value': '', 'Key': 'Name'}]))}
return dhcp_option_info

Loading…
Cancel
Save