diff options
author | Zuul <zuul@review.opendev.org> | 2020-07-17 16:28:14 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2020-07-17 16:28:14 +0000 |
commit | f988751c5c4a10fddbaac1bfcbdac923ab36e712 (patch) | |
tree | a8f3c2c47a74cd74375ae65470a575940533e08a /oslo_messaging | |
parent | afb035d97185fa9c622bdb9b4c31c71f01160370 (diff) | |
parent | 661bdd7f41d1e253e76c9d516019eb6aafe90f15 (diff) | |
download | oslo-messaging-f988751c5c4a10fddbaac1bfcbdac923ab36e712.tar.gz |
Merge "Drop a python 2 exception management"
Diffstat (limited to 'oslo_messaging')
-rw-r--r-- | oslo_messaging/_drivers/impl_rabbit.py | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/oslo_messaging/_drivers/impl_rabbit.py b/oslo_messaging/_drivers/impl_rabbit.py index c5c3970..f6ddf8f 100644 --- a/oslo_messaging/_drivers/impl_rabbit.py +++ b/oslo_messaging/_drivers/impl_rabbit.py @@ -975,13 +975,6 @@ class Connection(object): def _heartbeat_thread_job(self): """Thread that maintains inactive connections """ - # NOTE(hberaud): Python2 doesn't have ConnectionRefusedError - # defined so to switch connections destination on failure - # with python2 and python3 we need to wrapp adapt connection refused - try: - ConnectRefuseError = ConnectionRefusedError - except NameError: - ConnectRefuseError = socket.error while not self._heartbeat_exit_event.is_set(): with self._connection_lock.for_heartbeat(): @@ -1008,7 +1001,7 @@ class Connection(object): # ensure_connection for switching the # connection destination. except (socket.timeout, - ConnectRefuseError, + ConnectionRefusedError, OSError, kombu.exceptions.OperationalError) as exc: LOG.info("A recoverable connection/channel error " |