summaryrefslogtreecommitdiffstats
path: root/openstack/common/rpc/impl_qpid.py
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2012-11-12 00:23:33 +0000
committerGerrit Code Review <review@openstack.org>2012-11-12 00:23:33 +0000
commit5a6d1b76fddd749f90f00b6bde83d25d27cd1121 (patch)
tree6026277abf8a84a420e7eba6710c1eceb74216d9 /openstack/common/rpc/impl_qpid.py
parent87d5860a9d30924e3887f008a94a229ef4ff9485 (diff)
parentcf849e0b41e363f7efe18deaf4880f1e8c6235cd (diff)
Merge "Clean up dictionary use in RPC drivers"
Diffstat (limited to 'openstack/common/rpc/impl_qpid.py')
-rw-r--r--openstack/common/rpc/impl_qpid.py18
1 files changed, 7 insertions, 11 deletions
diff --git a/openstack/common/rpc/impl_qpid.py b/openstack/common/rpc/impl_qpid.py
index 1b81cd9..c29da5d 100644
--- a/openstack/common/rpc/impl_qpid.py
+++ b/openstack/common/rpc/impl_qpid.py
@@ -294,17 +294,13 @@ class Connection(object):
self.consumer_thread = None
self.conf = conf
- if server_params is None:
- server_params = {}
-
- default_params = dict(hostname=self.conf.qpid_hostname,
- port=self.conf.qpid_port,
- username=self.conf.qpid_username,
- password=self.conf.qpid_password)
-
- params = server_params
- for key in default_params.keys():
- params.setdefault(key, default_params[key])
+ params = {
+ 'hostname': self.conf.qpid_hostname,
+ 'port': self.conf.qpid_port,
+ 'username': self.conf.qpid_username,
+ 'password': self.conf.qpid_password,
+ }
+ params.update(server_params or {})
self.broker = params['hostname'] + ":" + str(params['port'])
# Create the connection - this does not open the connection