@decorator
def checkUser(func, *args, **kwargs):
    """
    Check that the user is authenticated and known.
    """
    if kwargs not in "request":
        raise Exception("Request not available for XML-RPC %s" % \
                        func.func_name)
        
    if not hasattr(kwargs["request"], "user"):
        raise Exception("Authentication Middleware not installed in settings.")        

    if not kwargs['request'].user.is_authenticated():
        raise Exception("ERROR: %s: Unauthenticated user!" % func.func_name)
    else:
        kwargs['user'] = kwargs['request'].user
        return func(*args, **kwargs)
dataset/ETHPy150Open fp7-ofelia/ocf/optin_manager/src/python/openflow/optin_manager/dummyfv/rpc.py/checkUser/swapped operands of `not in`