Fix DescribeImages to throw error if AMI requested does not exist

This commit is contained in:
Hugo Lopes Tavares 2014-01-28 18:14:00 -05:00
commit 90aa87d53e
5 changed files with 25 additions and 6 deletions

View file

@ -15,7 +15,7 @@ class InstanceResponse(BaseResponse):
reservations = ec2_backend.get_reservations_by_instance_ids(instance_ids)
except InvalidIdError as exc:
template = Template(EC2_INVALID_INSTANCE_ID)
return template.render(instance_id=exc.instance_id), dict(status=400)
return template.render(instance_id=exc.id), dict(status=400)
else:
reservations = ec2_backend.all_reservations(make_copy=True)