catch socket.error errors in badCertTest

This commit is contained in:
Bill Janssen 2008-07-17 18:01:57 +00:00
parent 454816d8bd
commit 0c1dbf8792
1 changed files with 3 additions and 0 deletions

View File

@ -598,6 +598,9 @@ else:
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:
raise test_support.TestFailed(
"Use of invalid cert should have failed!")