def delete_if_exists(path, remove=os.unlink):

    try:
        remove(path)
    except OSError as e:
        if e.errno != errno.ENOENT:
            raise
Get the correct glance client and id for the given image_href.
dataset/ETHPy150Open openstack/solum/solum/openstack/common/fileutils.py/delete_if_exists--crossover with--dataset/ETHPy150Open nii-cloud/dodai-compute/nova/image/glance.py/get_glance_client