def _handle_object_not_found(fnc):
    @wraps(fnc)
    def wrapped(self, obj, *args, **kwargs):
        try:
            return fnc(self, obj, *args, **kwargs)
        except exc.NotFound as e:
            name = utils.get_name(obj)
            e.message = "Object '%s' doesn't exist" % name
            raise exc.NoSuchObject(e)
    return wrapped
dataset/ETHPy150Open rackspace/pyrax/pyrax/object_storage.py/_handle_object_not_found/original