Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ddc5669

Browse files
author
Bill Janssen
committed
catch socket.error errors in badCertTest
1 parent bded4d3 commit ddc5669

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

Lib/test/test_ssl.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -601,6 +601,9 @@ def badCertTest (certfile):
601601
except ssl.SSLError as x:
602602
if support.verbose:
603603
sys.stdout.write("\nSSLError is %s\n" % x)
604+
except socket.error as x:
605+
if support.verbose:
606+
sys.stdout.write("\nsocket.error is %s\n" % x)
604607
else:
605608
raise support.TestFailed(
606609
"Use of invalid cert should have failed!")

0 commit comments

Comments
 (0)