Browse Source

Remove references to 'sys.version_info'

We support Python 3.6 as a minimum now, making these checks no-ops.

Change-Id: I2cd6d5272eeacbda91e389efb1cfaaadf376d767
changes/92/787992/4 12.8.0
Jorhson Deng 2 months ago
committed by dengzhaosen
parent
commit
355e0bd79b
1 changed files with 1 additions and 12 deletions
  1. +1
    -12
      oslo_messaging/_drivers/pool.py

+ 1
- 12
oslo_messaging/_drivers/pool.py View File

@ -14,7 +14,6 @@
import abc
import collections
import sys
import threading
from oslo_log import log as logging
@ -24,16 +23,6 @@ from oslo_messaging._drivers import common
LOG = logging.getLogger(__name__)
# TODO(harlowja): remove this when we no longer have to support 2.7
if sys.version_info[0:2] < (3, 2):
def wait_condition(cond):
# FIXME(markmc): timeout needed to allow keyboard interrupt
# http://bugs.python.org/issue8844
cond.wait(timeout=1)
else:
def wait_condition(cond):
cond.wait()
class Pool(object, metaclass=abc.ABCMeta):
"""A thread-safe object pool.
@ -102,7 +91,7 @@ class Pool(object, metaclass=abc.ABCMeta):
"current size %s surpasses max "
"configured rpc_conn_pool_size %s",
self._current_size, self._max_size)
wait_condition(self._cond)
self._cond.wait()
# We've grabbed a slot and dropped the lock, now do the creation
try:


Loading…
Cancel
Save