]> granicus.if.org Git - python/commitdiff
catch socket.error errors in badCertTest
authorBill Janssen <janssen@parc.com>
Thu, 17 Jul 2008 18:17:20 +0000 (18:17 +0000)
committerBill Janssen <janssen@parc.com>
Thu, 17 Jul 2008 18:17:20 +0000 (18:17 +0000)
Lib/test/test_ssl.py

index 52c392c58c0b6bcde0af6c54299fe3c88a035219..9e36e8067a8ca6335e9ea290af4cf9dd180383d7 100644 (file)
@@ -601,6 +601,9 @@ else:
             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!")