#NEWLINE# def _set_external_network( self , router , ext_net_dict ) : #NEWLINE# #INDENT# gateway_info = router . external_gateway_info #NEWLINE# if gateway_info : #NEWLINE# #INDENT# ext_net_id = gateway_info [ 'network_id' ] #NEWLINE# if ( ext_net_id in ext_net_dict ) : #NEWLINE# #INDENT# gateway_info [ 'network' ] = ext_net_dict [ ext_net_id ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# msg = ( _ ( 'External network "%s" not found.' ) % ext_net_id ) #NEWLINE# exceptions . handle ( self . request , msg )