Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions Lib/test/test_ssl.py
Original file line number Diff line number Diff line change
Expand Up @@ -4074,9 +4074,7 @@ def test_session_handling(self):
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:
Expand Down
4 changes: 2 additions & 2 deletions Modules/_ssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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;
Expand Down