bpo-31432: Revert unrelated code changes to _ssl.c and test_ssl (GH-7650)

This commit is contained in:
Ned Deily 2018-06-11 20:26:28 -04:00 committed by GitHub
parent ef24b6c54d
commit 4531ec74c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 5 deletions

View 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:

View 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;