#NEWLINE# def _make_config( self ) : #NEWLINE# #INDENT# '\n        Make an appropriate mosquitto config snippet out of\n        our params and saved state\n        ' #NEWLINE# self . port = self . _get_free_listen_port ( ) #NEWLINE# template = MOSQ_BRIDGE_CFG_TEMPLATE #NEWLINE# inputs = { #NEWLINE# #INDENT# 'listen_port' : self . port , #NEWLINE# 'malaria_target' : ( '%s:%d' % ( self . target_host , self . target_port ) ) , #NEWLINE# 'cid' : self . label , #NEWLINE# 'qos' : 1 , #NEWLINE# #UNINDENT# } #NEWLINE# if self . auth : #NEWLINE# #INDENT# template = ( template + MOSQ_BRIDGE_CFG_TEMPLATE_PSK ) #NEWLINE# aa = self . auth . split ( ':' ) #NEWLINE# inputs [ 'psk_id' ] = aa [ 0 ] #NEWLINE# inputs [ 'psk_key' ] = aa [ 1 ] #NEWLINE# #UNINDENT# return ( template % inputs )