@decorator.decorator
def process_keystone_exc(f, *args, **kwargs):
    from keystoneclient import exceptions as keystone_exc

    try:
        return f(*args, **kwargs)
    except keystone_exc.Unauthorized as e:
        print(_("User credentials are wrong! \n%s") % e)
        return 1
    except keystone_exc.AuthorizationFailure as e:
        print(_("Failed to authorize! \n%s") % e)
        return 1
    except keystone_exc.ConnectionRefused as e:
        print(_("Rally can't reach the Keystone service! \n%s") % e)
        return 1
dataset/ETHPy150Open openstack/rally/rally/cli/cliutils.py/process_keystone_exc/original