Add 'is_available' function
Resolves the following warnings seen in the likes of Neutron: opt/stack/neutron/neutron/common/eventlet_utils.py:28: DeprecationWarning: Please provide `is_available()` function in your custom Eventlet hub <module 'oslo_service' It must return bool: whether hub supports current platform. See eventlet/hubs/{epoll,kqueue} for example. Since we're simply taking the default hub provided by eventlet and overriding a single attribute, we will always have support so set the attribute. Change-Id: Ie90bcce1d1724108e5d0e583a36aa2e20102bba4
This commit is contained in:
parent
d5b33ffc77
commit
f9b5a7b6d7
|
@ -25,7 +25,8 @@ def monkey_patch():
|
|||
# This issue is fixed in eventlet with patch
|
||||
# https://github.com/eventlet/eventlet/commit/b756447bab51046dfc6f1e0e299cc997ab343701
|
||||
# For details please check https://bugs.launchpad.net/neutron/+bug/1745013
|
||||
eventlet.hubs.get_hub()
|
||||
hub = eventlet.hubs.get_hub()
|
||||
hub.is_available = lambda: True
|
||||
if os.name != 'nt':
|
||||
eventlet.monkey_patch()
|
||||
|
||||
|
|
Loading…
Reference in New Issue