Browse Source

[805] Python accept returns tuple

The socket and an address. We don't care about the address, but we still
need to unpack the socket out.
Michal 'vorner' Vaner 13 years ago
parent
commit
3cdb00878c
2 changed files with 2 additions and 2 deletions
  1. 1 1
      src/bin/bind10/bind10_src.py.in
  2. 1 1
      src/bin/bind10/tests/bind10_test.py.in

+ 1 - 1
src/bin/bind10/bind10_src.py.in

@@ -914,7 +914,7 @@ class BoB:
         Accept a socket from the unix domain socket server and put it to the
         others we care about.
         """
-        socket = self._srv_socket.accept()
+        (socket, conn) = self._srv_socket.accept()
         self._unix_sockets[socket.fileno()] = (socket, b'')
 
     def _socket_data(self, socket_fileno):

+ 1 - 1
src/bin/bind10/tests/bind10_test.py.in

@@ -1235,7 +1235,7 @@ class SocketSrvTest(unittest.TestCase):
             return self.__fileno
 
         def accept(self):
-            return self.__class__(self.__owner, 13)
+            return (self.__class__(self.__owner, 13), "/path/to/socket")
 
         def recv(self, bufsize, flags=0):
             self.__owner.assertEqual(1, bufsize)