summaryrefslogtreecommitdiffstats
path: root/openstack
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2013-02-02 16:22:58 +0000
committerGerrit Code Review <review@openstack.org>2013-02-02 16:22:58 +0000
commitea160989ad2708e59ec77ce855e51d118d5edfb6 (patch)
tree6c53b5c5f19d5dd2a32c427b1abb8cb5381c675d /openstack
parent343c6dd14613dcbd009e7339ad609a000915b413 (diff)
parentd0b39463831ac818ba97ff7489685da1d8db5f60 (diff)
downloadoslo-ea160989ad2708e59ec77ce855e51d118d5edfb6.tar.gz
oslo-ea160989ad2708e59ec77ce855e51d118d5edfb6.tar.xz
oslo-ea160989ad2708e59ec77ce855e51d118d5edfb6.zip
Merge "Use importutils for matchmaker import."
Diffstat (limited to 'openstack')
-rw-r--r--openstack/common/rpc/impl_zmq.py16
1 files changed, 1 insertions, 15 deletions
diff --git a/openstack/common/rpc/impl_zmq.py b/openstack/common/rpc/impl_zmq.py
index b3c43a2..0e998e9 100644
--- a/openstack/common/rpc/impl_zmq.py
+++ b/openstack/common/rpc/impl_zmq.py
@@ -17,7 +17,6 @@
import os
import pprint
import socket
-import string
import sys
import types
import uuid
@@ -781,18 +780,5 @@ def _get_ctxt():
def _get_matchmaker():
global matchmaker
if not matchmaker:
- # rpc_zmq_matchmaker should be set to a 'module.Class'
- mm_path = CONF.rpc_zmq_matchmaker.split('.')
- mm_module = '.'.join(mm_path[:-1])
- mm_class = mm_path[-1]
-
- # Only initialize a class.
- if mm_path[-1][0] not in string.ascii_uppercase:
- LOG.error(_("Matchmaker could not be loaded.\n"
- "rpc_zmq_matchmaker is not a class."))
- raise RPCException(_("Error loading Matchmaker."))
-
- mm_impl = importutils.import_module(mm_module)
- mm_constructor = getattr(mm_impl, mm_class)
- matchmaker = mm_constructor()
+ matchmaker = importutils.import_object(CONF.rpc_zmq_matchmaker)
return matchmaker