summaryrefslogtreecommitdiffstats
path: root/openstack
diff options
context:
space:
mode:
authorRussell Bryant <rbryant@redhat.com>2012-11-05 12:58:25 -0500
committerRussell Bryant <rbryant@redhat.com>2012-11-05 12:58:25 -0500
commit2f7503372467d9998b67e2c58ffaf51733329944 (patch)
treef1620c6f914fca0b26c86dbe94c1d21b46e80ae7 /openstack
parentd41e45b9946fc0dd4d1a2c90a848d1f92d58fc11 (diff)
downloadoslo-2f7503372467d9998b67e2c58ffaf51733329944.tar.gz
oslo-2f7503372467d9998b67e2c58ffaf51733329944.tar.xz
oslo-2f7503372467d9998b67e2c58ffaf51733329944.zip
Tweak rpc.queue_get_for to deal with host=None.
Make rpc.queue_get_for() just a tad more convenient by dealing with the case of host=None. In that case, just return the base topic. Change-Id: I2f55c2205c219df7481dd6e507caf7182622195b
Diffstat (limited to 'openstack')
-rw-r--r--openstack/common/rpc/__init__.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/openstack/common/rpc/__init__.py b/openstack/common/rpc/__init__.py
index da45d5a..f84c493 100644
--- a/openstack/common/rpc/__init__.py
+++ b/openstack/common/rpc/__init__.py
@@ -250,7 +250,7 @@ def queue_get_for(context, topic, host):
Messages sent to the 'foo.<host>' topic are sent to the nova-foo service on
<host>.
"""
- return '%s.%s' % (topic, host)
+ return '%s.%s' % (topic, host) if host else topic
_RPCIMPL = None