def wrap_keystone_exception(func):
    @functools.wraps(func)
    def wrapped(*args, **kw):
        try:
            return func(*args, **kw)
        except keystone_exceptions.AuthorizationFailure:
            raise AuthorizationFailure(
                client=func.__name__, message="reason: %s" % sys.exc_info()[1])
        except keystone_exceptions.ClientException:
            raise AuthorizationFailure(
                client=func.__name__,
                message="unexpected keystone client error occurred: %s"
                        % sys.exc_info()[1])
    return wrapped
Change the active selector widget
dataset/ETHPy150Open openstack/solum/solum/common/exception.py/wrap_keystone_exception--crossover with--dataset/ETHPy150Open mrterry/yoink/yoink/line_app.py/LineExtractor.toggle_state