[Checkins] SVN: ZODB/trunk/src/ZEO/tests/forker.py Darwin generates a different error number when trying to connect to a

Jim Fulton jim at zope.com
Sat Jul 1 09:53:27 EDT 2006


Log message for revision 68936:
  Darwin generates a different error number when trying to connect to a
  port that nothing's listening on.
  

Changed:
  U   ZODB/trunk/src/ZEO/tests/forker.py

-=-
Modified: ZODB/trunk/src/ZEO/tests/forker.py
===================================================================
--- ZODB/trunk/src/ZEO/tests/forker.py	2006-06-30 23:21:26 UTC (rev 68935)
+++ ZODB/trunk/src/ZEO/tests/forker.py	2006-07-01 13:53:26 UTC (rev 68936)
@@ -185,7 +185,12 @@
                 break
             raise
         except socket.error, e:
-            if e[0] == errno.ECONNREFUSED and i > 0:
+            if (e[0] == errno.ECONNREFUSED
+                or
+                # MAC OS X uses EINVAL when connecting to a port
+                # that isn't being listened on.
+                (sys.platform == 'darwin' and e[0] == errno.EINVAL)
+                ) and i > 0:
                 break
             raise
         try:



More information about the Checkins mailing list