Add 'allow_non_master' to FdTransport for compatibility
authorPetr Pudlak <pudlak@google.com>
Thu, 2 Jul 2015 09:27:13 +0000 (11:27 +0200)
committerPetr Pudlak <pudlak@google.com>
Fri, 3 Jul 2015 07:56:00 +0000 (09:56 +0200)
Since it serves as an alternative to the Transport class, it should
support the same constructor options, even if it doesn't use them.

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

lib/rpc/transport.py

index e822bb3..0350fa2 100644 (file)
@@ -250,7 +250,8 @@ class FdTransport:
   Unlike L{Transport}, this doesn't use timeouts.
   """
 
-  def __init__(self, fds, timeouts=None): # pylint: disable=W0613
+  def __init__(self, fds,
+               timeouts=None, allow_non_master=None): # pylint: disable=W0613
     """Constructor for the Client class.
 
     @type fds: pair of file descriptors
@@ -258,6 +259,8 @@ class FdTransport:
         and the file descriptor for writing (the second)
     @type timeouts: int
     @param timeouts: unused
+    @type allow_non_master: bool
+    @param allow_non_master: unused
 
     """
     self._rstream = io.open(fds[0], 'rb', 0)