From e8703dc80287614581a64e4cc090e37b4caa2452 Mon Sep 17 00:00:00 2001 From: "ChangBo Guo(gcb)" Date: Tue, 22 Dec 2015 12:59:35 +0800 Subject: [PATCH] zmq: Don't log error when can't import zmq module Method import_zmq returns None if can't import zmq module. For runtime code, an ImportError is raised, and for tests, a skip message "zmq not available" is sent, so it's unnecessary to log error which shows up in other projects' unit test logs. Co-Authored-By: Oleksii Zamiatin Change-Id: Iebf15042f45da56eb633a0a70822c487dc72c884 Closes-Bug: #1528415 --- oslo_messaging/_drivers/zmq_driver/zmq_async.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/oslo_messaging/_drivers/zmq_driver/zmq_async.py b/oslo_messaging/_drivers/zmq_driver/zmq_async.py index d0e184345..6819a7e67 100644 --- a/oslo_messaging/_drivers/zmq_driver/zmq_async.py +++ b/oslo_messaging/_drivers/zmq_driver/zmq_async.py @@ -14,7 +14,7 @@ import logging -from oslo_messaging._i18n import _, _LE +from oslo_messaging._i18n import _ from oslo_utils import importutils LOG = logging.getLogger(__name__) @@ -32,8 +32,6 @@ def import_zmq(zmq_concurrency='eventlet'): imported_zmq = importutils.try_import(ZMQ_MODULES[zmq_concurrency], default=None) - if imported_zmq is None: - LOG.error(_LE("ZeroMQ not found!")) return imported_zmq