Revision c4071978 lib/rpc/client.py

b/lib/rpc/client.py
232 232
                                   " expected list, got %s" % type(args))
233 233
    return CallRPCMethod(self._SendMethodCall, method, args,
234 234
                         version=self.version)
235

  
236

  
237
class AbstractStubClient(AbstractClient):
238
  """An abstract Client that connects a generated stub client to a L{Transport}.
239

  
240
  Subclasses should inherit from this class (first) as well and a designated
241
  stub (second).
242
  """
243

  
244
  def __init__(self, timeouts=None, transport=t.Transport):
245
    """Constructor for the class.
246

  
247
    Arguments are the same as for L{AbstractClient}. Checks that SOCKET_PATH
248
    attribute is defined (in the stub class).
249
    """
250

  
251
    super(AbstractStubClient, self).__init__(timeouts, transport)
252

  
253
  def _GenericInvoke(self, method, *args):
254
    return self.CallMethod(method, args)
255

  
256
  def _GetAddress(self):
257
    return self._GetSocketPath() # pylint: disable=E1101

Also available in: Unified diff