#NEWLINE# def send_signal( self , watcher , signum , pid = 0 , children = False , childpid = 0 , recursive = False ) : #NEWLINE# #INDENT# assert ( type ( watcher ) == str ) #NEWLINE# assert ( ( type ( signum ) == int ) and ( signum > 0 ) and ( signum < 32 ) ) #NEWLINE# assert ( ( type ( pid ) == int ) and ( pid >= 0 ) ) #NEWLINE# assert ( ( type ( childpid ) == int ) and ( childpid >= 0 ) ) #NEWLINE# assert ( type ( children ) == bool ) #NEWLINE# assert ( type ( recursive ) == bool ) #NEWLINE# signal_command = Dict ( ) #NEWLINE# signal_command . command = 'signal' #NEWLINE# signal_command . properties . name = watcher #NEWLINE# signal_command . properties . signum = signum #NEWLINE# signal_command . properties . pid = ( pid if ( pid > 0 ) else '' ) #NEWLINE# signal_command . properties . children = children #NEWLINE# signal_command . properties . childpid = ( childpid if ( childpid > 0 ) else '' ) #NEWLINE# signal_command . properties . recursive = recursive #NEWLINE# signal_command . prune ( ) #NEWLINE# response = self . _client . call ( signal_command ) #NEWLINE# response = response . get ( 'status' , None ) #NEWLINE# if ( response and ( recursive == 'ok' ) ) : #NEWLINE# #INDENT# return True #NEWLINE# #UNINDENT# return False