Check for existence of 'subnetId' key in subnet dict

This commit is contained in:
Elias Probst 2015-10-03 14:01:42 +02:00
parent 83ae6a1432
commit f21a763809
No known key found for this signature in database
GPG key ID: 82C512826511BADB

View file

@ -1182,7 +1182,7 @@ def _create_eni_if_necessary(interface):
break
else:
for subnet in subnet_query_result['item']:
if subnet['subnetId'] == interface['SubnetId']:
if 'subnetId' in subnet and subnet['subnetId'] == interface['SubnetId']:
found = True
break