]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Issue #16274: Fix test_asyncore on Solaris.
authorTrent Nelson <trent@trent.me>
Sat, 27 Oct 2012 02:21:46 +0000 (22:21 -0400)
committerTrent Nelson <trent@trent.me>
Sat, 27 Oct 2012 02:21:46 +0000 (22:21 -0400)
Lib/test/test_asyncore.py
Misc/NEWS

index b8dfad279f31d6dd637b6b8d736ee35d7fbe6cd4..8f875ffb5f6415aba41eca2d081f2ffed8f7e2f4 100644 (file)
@@ -484,8 +484,9 @@ class TCPServer(asyncore.dispatcher):
         return self.socket.getsockname()[:2]
 
     def handle_accept(self):
-        sock, addr = self.accept()
-        self.handler(sock)
+        pair = self.accept()
+        if pair is not None:
+            self.handler(pair[0])
 
     def handle_error(self):
         raise
index 5052009e738d928562837bcc164a5d84f153e321..216346e4a43d743b21dea0dd0c499c1874ccd477 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -435,6 +435,8 @@ Extension Modules
 Tests
 -----
 
+- Issue #16274: Fix test_asyncore on Solaris.  Patch by Giampaolo Rodola'.
+
 - Issue #15040: Close files in mailbox tests for PyPy compatibility.
   Original patch by Matti Picus.