Skip to content

Commit

Permalink
catch socket.error errors in badCertTest
Browse files Browse the repository at this point in the history
  • Loading branch information
Bill Janssen committed Jul 17, 2008
1 parent bded4d3 commit ddc5669
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Lib/test/test_ssl.py
Original file line number Diff line number Diff line change
Expand Up @@ -601,6 +601,9 @@ def badCertTest (certfile):
except ssl.SSLError as x:
if support.verbose:
sys.stdout.write("\nSSLError is %s\n" % x)
except socket.error as x:
if support.verbose:
sys.stdout.write("\nsocket.error is %s\n" % x)
else:
raise support.TestFailed(
"Use of invalid cert should have failed!")
Expand Down

0 comments on commit ddc5669

Please sign in to comment.