#NEWLINE# @ log . log_method_call #NEWLINE# def update_external_segment( self , context , external_segment_id , external_segment ) : #NEWLINE# #INDENT# es = external_segment [ 'external_segment' ] #NEWLINE# with context . session . begin ( subtransactions = True ) : #NEWLINE# #INDENT# es_db = self . _get_external_segment ( context , external_segment_id ) #NEWLINE# if ( 'external_routes' in es ) : #NEWLINE# #INDENT# self . _process_segment_ers ( context , es_db , es ) #NEWLINE# del es [ 'external_routes' ] #NEWLINE# #UNINDENT# es_db . update ( es ) #NEWLINE# #UNINDENT# return self . _make_external_segment_dict ( es_db )