

def does_image_exist(self, parameters):
    ' Queries Amazon EC2 to see if the specified image exists.\n\n    Args:\n      parameters: A dict that contains the machine ID to check for existence.\n    Returns:\n      True if the machine ID exists, False otherwise.\n    '
    try:
        conn = self.open_connection(parameters)
        image_id = parameters[image_id.PARAM_IMAGE_ID]
        conn.get_image(image_id)
        AppScaleLogger.log('Machine image {0} does exist'.format(image_id))
        return True
    except boto.exception.EC2ResponseError:
        AppScaleLogger.log('Machine image {0} does not exist'.format(image_id))
        return False

dataset/ETHPy150Open AppScale/appscale-tools/lib/agents/ec2_agent.py EC2Agent.does_image_exist/VarMisuse@31/121 `self`->`image_id`