Kaydet (Commit) a0e0e232 authored tarafından Antoine Pitrou's avatar Antoine Pitrou

Add a docstring to SSLError

üst b7705b77
...@@ -2297,6 +2297,10 @@ parse_openssl_version(unsigned long libver, ...@@ -2297,6 +2297,10 @@ parse_openssl_version(unsigned long libver,
*major = libver & 0xFF; *major = libver & 0xFF;
} }
PyDoc_STRVAR(SSLError_doc,
"An error occurred in the SSL implementation.");
PyMODINIT_FUNC PyMODINIT_FUNC
PyInit__ssl(void) PyInit__ssl(void)
{ {
...@@ -2333,9 +2337,10 @@ PyInit__ssl(void) ...@@ -2333,9 +2337,10 @@ PyInit__ssl(void)
OpenSSL_add_all_algorithms(); OpenSSL_add_all_algorithms();
/* Add symbols to module dict */ /* Add symbols to module dict */
PySSLErrorObject = PyErr_NewException("ssl.SSLError", PySSLErrorObject = PyErr_NewExceptionWithDoc("ssl.SSLError",
PyExc_OSError, SSLError_doc,
NULL); PyExc_OSError,
NULL);
if (PySSLErrorObject == NULL) if (PySSLErrorObject == NULL)
return NULL; return NULL;
if (PyDict_SetItemString(d, "SSLError", PySSLErrorObject) != 0) if (PyDict_SetItemString(d, "SSLError", PySSLErrorObject) != 0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment