1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Preventing Nonetype is not iterable error when no tags are passed in for a newly created ASG

This commit is contained in:
Marcus Ahle 2014-12-08 12:55:27 -05:00 committed by Matt Clay
parent 6609ebde27
commit a71b1b7385

View file

@ -248,7 +248,7 @@ def get_properties(autoscaling_group):
properties['instance_facts'] = instance_facts
properties['load_balancers'] = autoscaling_group.load_balancers
if hasattr(autoscaling_group, "tags"):
if getattr(autoscaling_group, "tags", None):
properties['tags'] = dict((t.key, t.value) for t in autoscaling_group.tags)
return properties