def __call__(self, environ, start_response): try: return self.app(environ, start_response) finally: DBSession.remove()