Do not use the deprecated best_match() method

This requires an upgrade of WebOb to 1.8.0.

Change-Id: Ifb0abb958ca30f19b4937384d9d732e2dc4e35a5
This commit is contained in:
Cyril Roelandt 2019-03-21 21:50:10 +01:00
parent c3ab308d08
commit baf3193f6a
3 changed files with 6 additions and 4 deletions

View File

@ -47,5 +47,5 @@ stevedore==1.20.0
testtools==2.2.0
traceback2==1.4.0
unittest2==1.1.0
WebOb==1.7.1
WebOb==1.8.0
wrapt==1.7.0

View File

@ -552,8 +552,10 @@ Reason
status = self.HEAD_HEALTHY_TO_STATUS_CODES[healthy]
else:
status = self.HEALTHY_TO_STATUS_CODES[healthy]
accept_type = req.accept.best_match(self._accept_order)
if not accept_type:
try:
offers = req.accept.acceptable_offers(self._accept_order)
accept_type = offers[0][0]
except IndexError:
accept_type = self._default_accept
functor = self._accept_to_functor[accept_type]
body, content_type = functor(results, healthy)

View File

@ -10,6 +10,6 @@ oslo.i18n>=3.15.3 # Apache-2.0
oslo.utils>=3.33.0 # Apache-2.0
six>=1.10.0 # MIT
stevedore>=1.20.0 # Apache-2.0
WebOb>=1.7.1 # MIT
WebOb>=1.8.0 # MIT
debtcollector>=1.2.0 # Apache-2.0
statsd>=3.2.1 # MIT