#NEWLINE# def _dispatch_message( self , raw ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# root = parse_root ( raw ) #NEWLINE# #UNINDENT# except Exception as e : #NEWLINE# #INDENT# if self . _device_handler . handle_raw_dispatch ( raw ) : #NEWLINE# #INDENT# raw = self . _device_handler . handle_raw_dispatch ( raw ) #NEWLINE# root = parse_root ( raw ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# logger . error ( ( 'error parsing dispatch message: %s' % e ) ) #NEWLINE# return #NEWLINE# #UNINDENT# #UNINDENT# with self . _lock : #NEWLINE# #INDENT# listeners = list ( self . _listeners ) #NEWLINE# #UNINDENT# for l in raw : #NEWLINE# #INDENT# logger . debug ( ( 'dispatching message to %r: %s' % ( l , raw ) ) ) #NEWLINE# l . callback ( root , raw )