summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorBrett Cannon <bcannon@gmail.com>2007-03-09 04:57:00 (GMT)
committerBrett Cannon <bcannon@gmail.com>2007-03-09 04:57:00 (GMT)
commitafd9b2b54d7f75d80ba8d8505e27d0b3746a96b9 (patch)
tree67b0d89fabd028e19e01f2e6c27394cc9fe179bf /Lib
parent1622d82c08d0978cc1f19e340370030b8f424a37 (diff)
downloadcpython-afd9b2b54d7f75d80ba8d8505e27d0b3746a96b9.zip
cpython-afd9b2b54d7f75d80ba8d8505e27d0b3746a96b9.tar.gz
cpython-afd9b2b54d7f75d80ba8d8505e27d0b3746a96b9.tar.bz2
Manual backport of r54233. This will help prevent spurious Buildbot failures
by HTTPS connections that time out.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_socket_ssl.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/Lib/test/test_socket_ssl.py b/Lib/test/test_socket_ssl.py
index 3c9c9f0..ae6e1da 100644
--- a/Lib/test/test_socket_ssl.py
+++ b/Lib/test/test_socket_ssl.py
@@ -27,7 +27,13 @@ def test_basic():
print "didn't raise TypeError"
socket.RAND_add("this is a random string", 75.0)
- f = urllib.urlopen('https://sf.net')
+ try:
+ f = urllib.urlopen('https://sf.net')
+ except IOError, exc:
+ if exc.errno == errno.ETIMEDOUT:
+ raise test_support.ResourceDenied('HTTPS connection is timing out')
+ else:
+ raise
buf = f.read()
f.close()