summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.openstack.org>2018-04-26 09:07:04 +0000
committerGerrit Code Review <review@openstack.org>2018-04-26 09:07:04 +0000
commitfb7c7e48933e5ee6035a51ba6747bedf59d3001b (patch)
tree6814c136b60739df133330c33b70085fbea13037
parentdfaf8608ecead94c07d20a209601ac1a7543ac9e (diff)
parent2c31f7f35129cb2160592633e52083b412d6c2cd (diff)
Merge "eventlet v0.22 changed HttpProtocol.__init__"
-rw-r--r--neutron/agent/linux/utils.py18
1 files changed, 15 insertions, 3 deletions
diff --git a/neutron/agent/linux/utils.py b/neutron/agent/linux/utils.py
index 7dc8489..356a304 100644
--- a/neutron/agent/linux/utils.py
+++ b/neutron/agent/linux/utils.py
@@ -390,9 +390,21 @@ class UnixDomainHttpProtocol(eventlet.wsgi.HttpProtocol):
390 def __init__(self, request, client_address, server): 390 def __init__(self, request, client_address, server):
391 if not client_address: 391 if not client_address:
392 client_address = ('<local>', 0) 392 client_address = ('<local>', 0)
393 # base class is old-style, so super does not work properly 393
394 eventlet.wsgi.HttpProtocol.__init__(self, request, client_address, 394 # NOTE(yamahata): from eventlet v0.22 HttpProtocol.__init__
395 server) 395 # signature was changed by changeset of
396 # 7f53465578543156e7251e243c0636e087a8445f
397 # try the new signature first, and then fallback to the old
398 # signature for compatibility
399 try:
400 conn_state = [client_address, request, eventlet.wsgi.STATE_CLOSE]
401 # base class is old-style, so super does not work properly
402 eventlet.wsgi.HttpProtocol.__init__(self, conn_state, server)
403 except (AttributeError, TypeError):
404 # AttributeError: missing STATE_CLOSE
405 # TypeError: signature mismatch
406 eventlet.wsgi.HttpProtocol.__init__(
407 self, request, client_address, server)
396 408
397 409
398class UnixDomainWSGIServer(wsgi.Server): 410class UnixDomainWSGIServer(wsgi.Server):