@contextmanager
    def open_for_read(self, image_id):
        path = self.get_image_filepath(image_id)
        with open(path, 'rb') as cache_file:
            yield cache_file
        path = self.get_image_filepath(image_id)
        inc_xattr(path, 'hits', 1)
Open and yield file for reading the image file for an image
dataset/ETHPy150Open rcbops/glance-buildpackage/glance/image_cache/drivers/xattr.py/Driver.open_for_read