From 88aaa70f0ccd088488748dd2b4388a2c8f074b62 Mon Sep 17 00:00:00 2001 From: bryan hunt Date: Wed, 30 Apr 2014 10:40:23 +0100 Subject: [PATCH] fix issue #7228 ec2_vol crash --- library/cloud/ec2_vol | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/library/cloud/ec2_vol b/library/cloud/ec2_vol index 152094d9b9b..02688b53749 100644 --- a/library/cloud/ec2_vol +++ b/library/cloud/ec2_vol @@ -278,15 +278,15 @@ def attach_volume(module, ec2, volume, instance): # Use password data attribute to tell whether the instance is Windows or Linux if device_name is None and instance: try: - if not ec2.get_password_data(inst.id): + if not ec2.get_password_data(instance.id): device_name = '/dev/sdf' - attach = volume.attach(inst.id, device_name) + attach = volume.attach(instance.id, device_name) while volume.attachment_state() != 'attached': time.sleep(3) volume.update() else: device_name = '/dev/xvdf' - attach = volume.attach(inst.id, device_name) + attach = volume.attach(instance.id, device_name) while volume.attachment_state() != 'attached': time.sleep(3) volume.update()