diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2020-11-22 11:25:02 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-22 11:25:02 (GMT) |
commit | 686c203cd4355be5b7809a9d24b4aa3566d9371f (patch) | |
tree | 457b1a741d4f70e85d2bea686cd9ffb822cd8a85 /Modules/_ssl.c | |
parent | c4d45ee670c09d4f6da709df072ec80cb7dfad22 (diff) | |
download | cpython-686c203cd4355be5b7809a9d24b4aa3566d9371f.zip cpython-686c203cd4355be5b7809a9d24b4aa3566d9371f.tar.gz cpython-686c203cd4355be5b7809a9d24b4aa3566d9371f.tar.bz2 |
bpo-42423: Accept single base class in PyType_FromModuleAndSpec() (GH-23441)
Diffstat (limited to 'Modules/_ssl.c')
-rw-r--r-- | Modules/_ssl.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/Modules/_ssl.c b/Modules/_ssl.c index 130dce4..6f799ee 100644 --- a/Modules/_ssl.c +++ b/Modules/_ssl.c @@ -5955,12 +5955,7 @@ do { \ if (PyModule_AddObjectRef(module, name, exc) < 0) goto error; \ } while(0) - bases = PyTuple_Pack(1, PyExc_OSError); - if (bases == NULL) { - goto error; - } - PySSLErrorObject = PyType_FromSpecWithBases(&sslerror_type_spec, bases); - Py_CLEAR(bases); + PySSLErrorObject = PyType_FromSpecWithBases(&sslerror_type_spec, PyExc_OSError); if (PySSLErrorObject == NULL) { goto error; } |