]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Initialize RpcProxy objects correctly
authorIlya Shakhat <ishakhat@mirantis.com>
Fri, 18 Jul 2014 10:09:18 +0000 (14:09 +0400)
committerIlya Shakhat <ishakhat@mirantis.com>
Fri, 18 Jul 2014 11:54:42 +0000 (15:54 +0400)
RpcProxy class is used as base in classes with multiple inheritance
(ex. MeteringAgent). To initialize objects of such classes correctly
every constructor should call its base constructor via super().__init__()

Closes bug 1332788

Change-Id: I00ef804b6ee6c73dec3e177202bb85311e3e2b10

neutron/common/rpc.py

index 3800a683dfe0625e338edf7ef30f1e0eb4139b09..9c564059686b2e826cbaf8e1671369ae2d4700c8 100644 (file)
@@ -147,6 +147,7 @@ class RpcProxy(object):
     RPC_API_NAMESPACE = None
 
     def __init__(self, topic, default_version, version_cap=None):
+        super(RpcProxy, self).__init__()
         self.topic = topic
         target = messaging.Target(topic=topic, version=default_version)
         self._client = get_client(target, version_cap=version_cap)