예제 #1
0
def handle(task, conn):
    if conn.status == 200:
        try:
            jsax.parse(conn, VersionTaskHandler())
            return 0
        except ValueError, msg:
            print "Got an error back from sinan. Check the logs at ~/.sinan/logs/kernel.log"
예제 #2
0
def handle(task, conn):
    global version
    if conn.status == 200:
        try:
            task_handler = VersionCheckTaskHandler()
            jsax.parse(conn, task_handler)
            version = task_handler.version
            return 0
        except ValueError, msg:
            print "Got an error back from sinan. Check the logs at ~/.sinan/logs/kernel.log"
예제 #3
0
def handle(task, conn):
    """ Handles output from the server. For the most part this just
    parses the default types of event layout and prints it to standard out
    in special cases it may do something else """
    if conn.status == 200:
        from libsinan import shell_handler
        try:
            jsax.parse(conn, shell_handler.ShellTaskHandler())
            return 0
        except ValueError, msg:
            print "Got an error back from sinan. Check the logs at ~/.sinan/logs/kernel.log"