#NEWLINE# def _sending_loop( self ) : #NEWLINE# #INDENT# debug = self . platform . config [ 'debug' ] #NEWLINE# try : #NEWLINE# #INDENT# while self . serial_connection : #NEWLINE# #INDENT# msg = self . send_queue . get ( ) #NEWLINE# self . serial_connection . write ( msg ) #NEWLINE# if debug : #NEWLINE# #INDENT# self . platform . log . info ( 'Sending: %s' , msg ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# except Exception : #NEWLINE# #INDENT# ( exc_type , exc_value , exc_traceback ) = sys . exc_info ( ) #NEWLINE# lines = traceback . format_exception ( exc_type , exc_value , exc_traceback ) #NEWLINE# msg = '' . join ( ( line for line in lines ) ) #NEWLINE# self . machine . crash_queue . put ( msg )