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
This commit is contained in:
ChangBo Guo(gcb) 2015-12-22 12:59:35 +08:00 committed by Oleksii Zamiatin
parent c9fe899d2a
commit e8703dc802
1 changed files with 1 additions and 3 deletions

View File

@ -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],
if imported_zmq is None:
LOG.error(_LE("ZeroMQ not found!"))
return imported_zmq