temboardagent/api.py
def check_sessionid(http_header, sessions):
    """
    Check X-Session is valid and the session exists.
    """
    validate_parameters(http_header,
                        [('X-Session', T_SESSIONID, False)])
    try:
        session = sessions.get_by_sessionid(
                    http_header['X-Session'].encode('utf-8'))
        session.time = time.time()
        username = session.username
        sessions.update(session)
        return username
    except SharedItem_not_found:
        raise HTTPError(401, "Invalid session.")

    Check X-Session is valid and the session exists.
    
Check X-Session is valid and the session exists.
Check X - Session is valid and the session exists .
def check_sessionid(http_header, sessions):
    validate_parameters(http_header,
                        [('X-Session', T_SESSIONID, False)])
    try:
        session = sessions.get_by_sessionid(
                    http_header['X-Session'].encode('utf-8'))
        session.time = time.time()
        username = session.username
        sessions.update(session)
        return username
    except SharedItem_not_found:
        raise HTTPError(401, "Invalid session.")
def check_sessionid ( http_header , sessions ) : validate_parameters ( http_header , [ ( 'X-Session' , T_SESSIONID , False ) ] ) try : session = sessions . get_by_sessionid ( http_header [ 'X-Session' ] . encode ( 'utf-8' ) ) session . time = time . time ( ) username = session . username sessions . update ( session ) return username except SharedItem_not_found : raise HTTPError ( 401 , "Invalid session." )
Check X-Session is valid and the session exists.
Check X - Session is valid and the session exists .
"""
    Check X-Session is valid and the session exists.
    """
http_header
sessions