def CallbackWrapper(wsgi_env, start_response):
     """Calls the WSGI app and the invokes the request-end callback."""
     try:
         return app(wsgi_env, start_response)
     finally:
         callback.InvokeCallbacks()
Ejemplo n.º 2
0
 def callback_wrapper(environ, start_response):
     """Call the WSGI app and then invoke the request-end callbacks."""
     try:
         return app(environ, start_response)
     finally:
         callback.InvokeCallbacks()
Ejemplo n.º 3
0
def CallbackMiddleware(app, wsgi_env, start_response):
    """Calls the request-end callback that the app may have set."""
    try:
        return app(wsgi_env, start_response)
    finally:
        callback.InvokeCallbacks()