diff options
author | Jorhson Deng <dengzhaosen@inspur.com> | 2021-04-27 01:46:46 +0000 |
---|---|---|
committer | dengzhaosen <dengzhaosen@inspur.com> | 2021-04-28 09:49:56 +0800 |
commit | 355e0bd79bc2757008ac883874c405b5a952bdf8 (patch) | |
tree | 2b816b9750516665798d44f5967327702f5cdcba /oslo_messaging | |
parent | 219ab1370597517c831d6efb4f39db89fa0af27a (diff) | |
download | oslo-messaging-355e0bd79bc2757008ac883874c405b5a952bdf8.tar.gz |
Remove references to 'sys.version_info'12.8.0
We support Python 3.6 as a minimum now, making these checks no-ops.
Change-Id: I2cd6d5272eeacbda91e389efb1cfaaadf376d767
Diffstat (limited to 'oslo_messaging')
-rw-r--r-- | oslo_messaging/_drivers/pool.py | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/oslo_messaging/_drivers/pool.py b/oslo_messaging/_drivers/pool.py index 7d29b78..8090e8d 100644 --- a/oslo_messaging/_drivers/pool.py +++ b/oslo_messaging/_drivers/pool.py @@ -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: |