]> granicus.if.org Git - python/commitdiff
Follow up to r88664: non-blocking connect-ex() can return EWOULDBLOCK under Windows
authorAntoine Pitrou <solipsis@pitrou.net>
Sun, 27 Feb 2011 15:44:12 +0000 (15:44 +0000)
committerAntoine Pitrou <solipsis@pitrou.net>
Sun, 27 Feb 2011 15:44:12 +0000 (15:44 +0000)
Lib/test/test_ssl.py

index 3347e9e6f3b5cfc4833d99b6b199d646bf36f5f7..164b6c262a5dceeabd0286c7d62eeecf4b4fb5e4 100644 (file)
@@ -474,7 +474,8 @@ class NetworkedTests(unittest.TestCase):
             try:
                 s.setblocking(False)
                 rc = s.connect_ex(('svn.python.org', 443))
-                self.assertIn(rc, (0, errno.EINPROGRESS))
+                # EWOULDBLOCK under Windows, EINPROGRESS elsewhere
+                self.assertIn(rc, (0, errno.EINPROGRESS, errno.EWOULDBLOCK))
                 # Wait for connect to finish
                 select.select([], [s], [], 5.0)
                 # Non-blocking handshake