#NEWLINE# def pre_process_extensions( self , extensions , request , action_args ) : #NEWLINE# #INDENT# post = [ ] #NEWLINE# for ext in extensions : #NEWLINE# #INDENT# if inspect . isgeneratorfunction ( ext ) : #NEWLINE# #INDENT# response = None #NEWLINE# try : #NEWLINE# #INDENT# with ResourceExceptionHandler ( ) : #NEWLINE# #INDENT# gen = ext ( req = request , ** action_args ) #NEWLINE# response = gen . next ( ) #NEWLINE# #UNINDENT# #UNINDENT# except Fault as ex : #NEWLINE# #INDENT# response = ex #NEWLINE# #UNINDENT# if response : #NEWLINE# #INDENT# return ( response , [ ] ) #NEWLINE# #UNINDENT# post . append ( gen ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# post . append ( ext ) #NEWLINE# #UNINDENT# #UNINDENT# return ( None , reversed ( post ) )