From cb886fe3d6407d40f9e594d1da2a7198deca572c Mon Sep 17 00:00:00 2001 From: Guillaume Plessis Date: Wed, 23 Aug 2017 12:58:23 -0700 Subject: [PATCH] =?UTF-8?q?Don=E2=80=99t=20crash=20on=20empty=20AMI=20name?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bootstrapvz/providers/ec2/tasks/ami.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 bootstrapvz/providers/ec2/tasks/ami.py diff --git a/bootstrapvz/providers/ec2/tasks/ami.py b/bootstrapvz/providers/ec2/tasks/ami.py old mode 100644 new mode 100755 index 202fb3b..497869f --- a/bootstrapvz/providers/ec2/tasks/ami.py +++ b/bootstrapvz/providers/ec2/tasks/ami.py @@ -23,7 +23,7 @@ class AMIName(Task): images = info._ec2['connection'].describe_images(Owners=['self'])['Images'] for image in images: - if ami_name == image['Name']: + if 'Name' in image and ami_name == image['Name']: msg = 'An image by the name {ami_name} already exists.'.format(ami_name=ami_name) raise TaskError(msg) info._ec2['ami_name'] = ami_name