From c5016d9ddb8e2935828ec4cc9992fb767f0fa31e Mon Sep 17 00:00:00 2001 From: kevgliss Date: Thu, 4 Feb 2016 16:03:20 -0800 Subject: [PATCH] ensuring boto3 can correctly identify instance security groups --- moto/ec2/responses/instances.py | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/moto/ec2/responses/instances.py b/moto/ec2/responses/instances.py index fdc2432c6..36df9bcc1 100644 --- a/moto/ec2/responses/instances.py +++ b/moto/ec2/responses/instances.py @@ -314,8 +314,12 @@ EC2_DESCRIBE_INSTANCES = """ {% for group in instance.dynamic_group_list %} - {{ group.id }} - {{ group.name }} + {% if group.id %} + {{ group.id }} + {{ group.name }} + {% else %} + {{ group }} + {% endif %} {% endfor %} @@ -418,8 +426,12 @@ EC2_DESCRIBE_INSTANCES = """