mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-08-22 09:50:37 +00:00
Merge pull request #392 from gplessis/empty-ami-names
Don’t crash on empty AMI name
This commit is contained in:
commit
4e06eb1f88
1 changed files with 1 additions and 1 deletions
2
bootstrapvz/providers/ec2/tasks/ami.py
Normal file → Executable file
2
bootstrapvz/providers/ec2/tasks/ami.py
Normal file → Executable file
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue