Merge "Add kwargs to WsgiMiddleware __init__"

This commit is contained in:
Zuul 2018-01-02 10:06:19 +00:00 committed by Gerrit Code Review
commit 3370658fb3
1 changed files with 5 additions and 1 deletions

View File

@ -69,7 +69,7 @@ def enable(hmac_keys=None):
class WsgiMiddleware(object):
"""WSGI Middleware that enables tracing for an application."""
def __init__(self, application, hmac_keys=None, enabled=False):
def __init__(self, application, hmac_keys=None, enabled=False, **kwargs):
"""Initialize middleware with api-paste.ini arguments.
:application: wsgi app
@ -79,6 +79,10 @@ class WsgiMiddleware(object):
by only those who knows this key which helps
avoid DDOS.
:enabled: This middleware can be turned off fully if enabled is False.
:kwargs: Other keyword arguments.
NOTE(tovin07): Currently, this `kwargs` is not used at all.
It's here to avoid some extra keyword arguments in local_conf
that cause `__init__() got an unexpected keyword argument`.
"""
self.application = application
self.name = "wsgi"