diff --git a/oslo/messaging/_drivers/impl_qpid.py b/oslo/messaging/_drivers/impl_qpid.py index f3988409b..54efc5db5 100644 --- a/oslo/messaging/_drivers/impl_qpid.py +++ b/oslo/messaging/_drivers/impl_qpid.py @@ -509,7 +509,7 @@ class Connection(object): if self.connection is not None and self.connection.opened(): try: self.connection.close() - except qpid_exceptions.ConnectionError: + except qpid_exceptions.MessagingError: pass broker = six.next(self.brokers) @@ -517,7 +517,7 @@ class Connection(object): try: self.connection_create(broker) self.connection.open() - except qpid_exceptions.ConnectionError as e: + except qpid_exceptions.MessagingError as e: msg_dict = dict(e=e, delay=delay) msg = _("Unable to connect to AMQP server: %(e)s. " "Sleeping %(delay)s seconds") % msg_dict @@ -545,7 +545,7 @@ class Connection(object): try: return method(*args, **kwargs) except (qpid_exceptions.Empty, - qpid_exceptions.ConnectionError) as e: + qpid_exceptions.MessagingError) as e: if error_callback: error_callback(e) self.reconnect()