]> granicus.if.org Git - python/commitdiff
Add a docstring to SSLError
authorAntoine Pitrou <solipsis@pitrou.net>
Sat, 22 Oct 2011 21:41:52 +0000 (23:41 +0200)
committerAntoine Pitrou <solipsis@pitrou.net>
Sat, 22 Oct 2011 21:41:52 +0000 (23:41 +0200)
Modules/_ssl.c

index 36ce33fc53c9dd7ee2be38a212289940f73ca0e9..2998605476d28c3139ee4adb07a46c00d07baaf9 100644 (file)
@@ -2297,6 +2297,10 @@ parse_openssl_version(unsigned long libver,
     *major = libver & 0xFF;
 }
 
+PyDoc_STRVAR(SSLError_doc,
+"An error occurred in the SSL implementation.");
+
+
 PyMODINIT_FUNC
 PyInit__ssl(void)
 {
@@ -2333,9 +2337,10 @@ PyInit__ssl(void)
     OpenSSL_add_all_algorithms();
 
     /* Add symbols to module dict */
-    PySSLErrorObject = PyErr_NewException("ssl.SSLError",
-                                          PyExc_OSError,
-                                          NULL);
+    PySSLErrorObject = PyErr_NewExceptionWithDoc("ssl.SSLError",
+                                                 SSLError_doc,
+                                                 PyExc_OSError,
+                                                 NULL);
     if (PySSLErrorObject == NULL)
         return NULL;
     if (PyDict_SetItemString(d, "SSLError", PySSLErrorObject) != 0)