Ejemplo n.º 1
0
def signal_handler( signal, frame ):
    '''This method is in charge to capture SIGUSR
    signals and to close the server in the
    correct way.
    '''
    global __server
    if not __server is None:
        __server.stop()
        ArdnLib.disconnect()
    sys.exit( 0 )
Ejemplo n.º 2
0
def signal_handler( signal, frame ):
    '''This method is in charge to capture SIGUSR
    signals and to close the server in the
    correct way.
    '''
    global __server
    print '\n> Closing firebrain...'
    if not __server is None:
        __server.stop()
        ArdnLib.disconnect()
    print '> Firebrain closed'
    sys.exit( 0 )