#NEWLINE# def run_response_middlewares( self ) : #NEWLINE# #INDENT# reply = self . sender ( ) #NEWLINE# reply . metaDataChanged . disconnect ( self . run_response_middlewares ) #NEWLINE# render_options = self . _get_render_options ( reply . request ( ) ) #NEWLINE# if render_options : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# for middleware in reply . response_middlewares : #NEWLINE# #INDENT# middleware . process ( reply , render_options ) #NEWLINE# #UNINDENT# #UNINDENT# except : #NEWLINE# #INDENT# self . log ( 'internal error in response middleware' , min_level = 1 ) #NEWLINE# self . log ( traceback . format_exc ( ) , min_level = 1 , format_msg = False )