#NEWLINE# def _process_command( self , cmd , sender ) : #NEWLINE# #INDENT# logger = self . _logger . getChild ( 'worker' ) #NEWLINE# try : #NEWLINE# #INDENT# arg_list = cmd . split ( ) #NEWLINE# logger . debug ( ( 'get cmd: ' + str ( arg_list ) ) ) #NEWLINE# ( args , unknown_args ) = self . _cmd_parser . parse_known_args ( arg_list ) #NEWLINE# if ( len ( unknown_args ) > 0 ) : #NEWLINE# #INDENT# logger . debug ( ( 'unknown args: ' + str ( unknown_args ) ) ) #NEWLINE# #UNINDENT# args . proc ( args , sender ) #NEWLINE# #UNINDENT# except SystemExit as e : #NEWLINE# #INDENT# if ( e . code == 2 ) : #NEWLINE# #INDENT# matched = self . _cmd_parser . process_direct_commands ( cmd , sender ) #NEWLINE# if ( not matched ) : #NEWLINE# #INDENT# logger . debug ( 'no known args found.' ) #NEWLINE# sender . send_message ( 'Unknown commands.' ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# logger . exception ( 'Unexpected SystemExit' )