#NEWLINE# def __call__( self , environ , start_response ) : #NEWLINE# #INDENT# request = HTTPRequest ( environ , self . _config , self . _resolver , ( self . _urlbase + environ [ b'PATH_INFO' ] ) ) #NEWLINE# try : #NEWLINE# #INDENT# response = self . _resolver . dispatch ( request ) #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# ( ex , val , tb ) = sys . exc_info ( ) #NEWLINE# if issubclass ( ex , HTTPError ) : #NEWLINE# #INDENT# start_response ( str ( val ) . encode ( 'ascii' ) , [ ( b'Content-Type' , b'text/plain' ) ] , ( ex , val , tb ) ) #NEWLINE# return [ val . message ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# raise #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# start_response ( response . get_status ( ) , response . get_response_headers ( ) ) #NEWLINE# return response