]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-31432: Revert unrelated code changes to _ssl.c and test_ssl (GH-7650)
authorNed Deily <nad@python.org>
Tue, 12 Jun 2018 00:26:28 +0000 (20:26 -0400)
committerGitHub <noreply@github.com>
Tue, 12 Jun 2018 00:26:28 +0000 (20:26 -0400)
Lib/test/test_ssl.py
Modules/_ssl.c

index 3d6ae0298d020a368bb6a84b15a7f49a35b46f6b..73d3e3bbcdaeb8039029429d562aa81caab6d182 100644 (file)
@@ -4074,9 +4074,7 @@ class ThreadedTests(unittest.TestCase):
                 self.assertTrue(session)
                 with self.assertRaises(TypeError) as e:
                     s.session = object
-                self.assertEqual(
-                    str(e.exception), 'Value is not an SSLSession.'
-                )
+                self.assertEqual(str(e.exception), 'Value is not a SSLSession.')
 
             with client_context.wrap_socket(socket.socket(),
                                             server_hostname=hostname) as s:
index 00d648d8a93a5fa296388031df8146774e7552bb..2bce4816d26fe78783489d8478da583e3e23c325 100644 (file)
@@ -2066,7 +2066,7 @@ static int PySSL_set_context(PySSLSocket *self, PyObject *value,
         SSL_set_SSL_CTX(self->ssl, self->ctx->ctx);
 #endif
     } else {
-        PyErr_SetString(PyExc_TypeError, "The value must be an SSLContext.");
+        PyErr_SetString(PyExc_TypeError, "The value must be a SSLContext");
         return -1;
     }
 
@@ -2725,7 +2725,7 @@ static int PySSL_set_session(PySSLSocket *self, PyObject *value,
     int result;
 
     if (!PySSLSession_Check(value)) {
-        PyErr_SetString(PyExc_TypeError, "Value is not an SSLSession.");
+        PyErr_SetString(PyExc_TypeError, "Value is not a SSLSession.");
         return -1;
     }
     pysess = (PySSLSession *)value;