#NEWLINE# def __set_baudrate( self , baud ) : #NEWLINE# #INDENT# 'setting baudrate if supported' #NEWLINE# log . info ( 'Changing communication to %s baud' , baud ) #NEWLINE# self . __writeln ( UART_SETUP . format ( baud = baud ) ) #NEWLINE# time . sleep ( 0.1 ) #NEWLINE# try : #NEWLINE# #INDENT# self . _port . setBaudrate ( self ) #NEWLINE# #UNINDENT# except AttributeError : #NEWLINE# #INDENT# self . _port . baudrate = baud