From c199fd6fa39311305b5b5d94c2e3732b826a6414 Mon Sep 17 00:00:00 2001 From: Joe Gordon Date: Wed, 20 Mar 2013 14:03:36 -0700 Subject: Remove outdated try except block in ec2 code We now have 'ec2_id -> glance_id mapping' so this check can be removed Change-Id: Ib10ab5faea154bae9d129c0dc1edc24c2a99ffb7 --- nova/api/ec2/ec2utils.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'nova/api') diff --git a/nova/api/ec2/ec2utils.py b/nova/api/ec2/ec2utils.py index bb0f7245a..eede3576a 100644 --- a/nova/api/ec2/ec2utils.py +++ b/nova/api/ec2/ec2utils.py @@ -83,12 +83,7 @@ def ec2_id_to_id(ec2_id): def image_ec2_id(image_id, image_type='ami'): """Returns image ec2_id using id and three letter type.""" template = image_type + '-%08x' - try: - return id_to_ec2_id(image_id, template=template) - except ValueError: - #TODO(wwolf): once we have ec2_id -> glance_id mapping - # in place, this wont be necessary - return "ami-00000000" + return id_to_ec2_id(image_id, template=template) def get_ip_info_for_instance_from_nw_info(nw_info): -- cgit