cloudformation_facts: Fixes PhysicalResourceId KeyError(#55990)

Fixes: #38033
pull/59287/head
Denis Afonso 5 years ago committed by Abhijeet Kasurde
parent e7c9c9585e
commit da047eec59

@ -256,7 +256,7 @@ class CloudFormationServiceManager:
def to_dict(items, key, value): def to_dict(items, key, value):
''' Transforms a list of items to a Key/Value dictionary ''' ''' Transforms a list of items to a Key/Value dictionary '''
if items: if items:
return dict(zip([i[key] for i in items], [i[value] for i in items])) return dict(zip([i.get(key) for i in items], [i.get(value) for i in items]))
else: else:
return dict() return dict()

Loading…
Cancel
Save