From e5fdbc25a2b10c7cea8354b9a1977817e1382ef2 Mon Sep 17 00:00:00 2001 From: Bret Martin Date: Sun, 6 Sep 2015 22:00:02 -0400 Subject: [PATCH] Only wait for ENI attachment at creation when instance_id is specified --- cloud/amazon/ec2_eni.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cloud/amazon/ec2_eni.py b/cloud/amazon/ec2_eni.py index 9e878e7d558..4d08aeb26d0 100644 --- a/cloud/amazon/ec2_eni.py +++ b/cloud/amazon/ec2_eni.py @@ -213,9 +213,9 @@ def create_eni(connection, module): except BotoServerError as ex: eni.delete() raise + # Wait to allow creation / attachment to finish + wait_for_eni(eni, "attached") changed = True - # Wait to allow creation / attachment to finish - wait_for_eni(eni, "attached") eni.update() except BotoServerError as e: