def __call__(self, environ, start_response): try: return self.application(environ, start_response) except Exception: import traceback;traceback.print_exc() return InternalServerError()(environ, start_response) finally: ContextLocals.purge()
def __call__(self, environ, start_response): try: return self.application(environ, start_response) except Exception: import traceback traceback.print_exc() return InternalServerError()(environ, start_response) finally: ContextLocals.purge()
def _execute_operation(self, request, subject=None, data=None): response = ServerResponse() controller = Controller() content = getattr(controller, request)(None, response, subject, data) if content and content is not response: response(content) if not response.status: response.status = OK ContextLocals.purge() return response
def _execute_operation(self, request, subject=None, data=None): response = ServerResponse() controller = Controller() content = getattr(controller, request)(None, response, subject, data) if content and content is not response: response(content) if not response.status: response.status = OK ContextLocals.purge() return response
def __call__(self, environ, start_response): response = self.application(environ, start_response) ContextLocals.purge() return response
def __call__(self, environ, start_response): response = self.application(environ, start_response) ContextLocals.purge() return response