Add the 'allow_non_master' option to the WConfd RPC client
authorPetr Pudlak <pudlak@google.com>
Thu, 2 Jul 2015 09:28:41 +0000 (11:28 +0200)
committerPetr Pudlak <pudlak@google.com>
Fri, 3 Jul 2015 07:56:06 +0000 (09:56 +0200)
While at it, fix the call to the AbstractStubClient to properly pass the
keyword arguments.

Signed-off-by: Petr Pudlak <pudlak@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>

lib/wconfd.py

index d834e68..dd0766e 100644 (file)
@@ -49,13 +49,16 @@ class Client(cl.AbstractStubClient, stub.ClientRpcStub):
   implements data serialization/deserialization.
 
   """
-  def __init__(self, timeouts=None, transport=Transport):
+  def __init__(self, timeouts=None, transport=Transport, allow_non_master=None):
     """Constructor for the Client class.
 
     Arguments are the same as for L{AbstractClient}.
 
     """
-    cl.AbstractStubClient.__init__(self, timeouts, transport)
+    cl.AbstractStubClient.__init__(self,
+                                   timeouts=timeouts,
+                                   transport=transport,
+                                   allow_non_master=allow_non_master)
     stub.ClientRpcStub.__init__(self)
 
     retries = 12