[Python-checkins] r80534 - python/trunk/Lib/test/test_ssl.py
antoine.pitrou
python-checkins at python.org
Tue Apr 27 15:13:27 CEST 2010
Author: antoine.pitrou
Date: Tue Apr 27 15:13:26 2010
New Revision: 80534
Log:
socket.error can really happen here, and fix a possible NameError
Modified:
python/trunk/Lib/test/test_ssl.py
Modified: python/trunk/Lib/test/test_ssl.py
==============================================================================
--- python/trunk/Lib/test/test_ssl.py (original)
+++ python/trunk/Lib/test/test_ssl.py Tue Apr 27 15:13:26 2010
@@ -684,6 +684,9 @@
except ssl.SSLError, x:
if test_support.verbose:
sys.stdout.write("\nSSLError is %s\n" % x[1])
+ except socket.error, x:
+ if test_support.verbose:
+ sys.stdout.write("\nsocket.error is %s\n" % x[1])
else:
self.fail("Use of invalid cert should have failed!")
finally:
@@ -902,7 +905,7 @@
sys.stdout.write("\n")
try:
tryProtocolCombo(ssl.PROTOCOL_SSLv23, ssl.PROTOCOL_SSLv2, True)
- except (SSLError, socket.error), x:
+ except (ssl.SSLError, socket.error), x:
# this fails on some older versions of OpenSSL (0.9.7l, for instance)
if test_support.verbose:
sys.stdout.write(
More information about the Python-checkins
mailing list