[Python-checkins] r61780 - python/trunk/Lib/test/test_socket_ssl.py
neal.norwitz
python-checkins at python.org
Sun Mar 23 06:47:20 CET 2008
Author: neal.norwitz
Date: Sun Mar 23 06:47:20 2008
New Revision: 61780
Modified:
python/trunk/Lib/test/test_socket_ssl.py
Log:
Suppress failure (to avoid a flaky test) if we cannot connect to svn.python.org
Modified: python/trunk/Lib/test/test_socket_ssl.py
==============================================================================
--- python/trunk/Lib/test/test_socket_ssl.py (original)
+++ python/trunk/Lib/test/test_socket_ssl.py Sun Mar 23 06:47:20 2008
@@ -55,7 +55,7 @@
def error_msg(extra_msg):
print >> sys.stderr, """\
WARNING: an attempt to connect to %r %s, in
- test_timeout. That may be legitimate, but is not the outcome we
+ testTimeout. That may be legitimate, but is not the outcome we
hoped for. If this message is seen often, testTimeout should be
changed to use a more reliable address.""" % (ADDR, extra_msg)
@@ -145,7 +145,15 @@
import os, httplib, ssl
with test_support.transient_internet():
s = socket.socket(socket.AF_INET)
- self.connect(s, ("svn.python.org", 443))
+ try:
+ self.connect(s, ("svn.python.org", 443))
+ except IOError:
+ print >> sys.stderr, """\
+ WARNING: an attempt to connect to svn.python.org:443 failed, in
+ test_978833. That may be legitimate, but is not the outcome we
+ hoped for. If this message is seen often, test_978833 should be
+ changed to use a more reliable address."""
+ return
fd = s._sock.fileno()
sock = ssl.wrap_socket(s)
s = None
More information about the Python-checkins
mailing list