]> granicus.if.org Git - python/commitdiff
Allow absent fromfd(), for Windows.
authorGuido van Rossum <guido@python.org>
Wed, 12 Jun 2002 20:48:59 +0000 (20:48 +0000)
committerGuido van Rossum <guido@python.org>
Wed, 12 Jun 2002 20:48:59 +0000 (20:48 +0000)
Lib/test/test_socket.py

index 8649a6b33298e29faead5f3773a4564ec445de8a..39d3130c8a0f40d83e22eef2326d6a3a510b2cfc 100644 (file)
@@ -323,6 +323,8 @@ class BasicTCPTest(SocketConnectedTest):
 
     def testFromFd(self):
         """Testing fromfd()."""
+        if not hasattr(socket, fromfd):
+            return # On Windows, this doesn't exist
         fd = self.cli_conn.fileno()
         sock = socket.fromfd(fd, socket.AF_INET, socket.SOCK_STREAM)
         msg = sock.recv(1024)