diff options
author | Christian Heimes <christian@python.org> | 2017-09-07 21:14:00 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-07 21:14:00 (GMT) |
commit | 17c9ac927b97472dd080174fde709d9234848195 (patch) | |
tree | e163ab88c15117498799d17c6047756f638c99ed /Modules/_ssl.c | |
parent | 3147b0422cbeb98065666ccf95ab6845ac800fd4 (diff) | |
download | cpython-17c9ac927b97472dd080174fde709d9234848195.zip cpython-17c9ac927b97472dd080174fde709d9234848195.tar.gz cpython-17c9ac927b97472dd080174fde709d9234848195.tar.bz2 |
bpo-28958: Improve SSLContext error reporting. (#3414)
Signed-off-by: Christian Heimes <christian@python.org>
Diffstat (limited to 'Modules/_ssl.c')
-rw-r--r-- | Modules/_ssl.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Modules/_ssl.c b/Modules/_ssl.c index b8509ac..5ea354a 100644 --- a/Modules/_ssl.c +++ b/Modules/_ssl.c @@ -2636,8 +2636,7 @@ _ssl__SSLContext_impl(PyTypeObject *type, int proto_version) return NULL; } if (ctx == NULL) { - PyErr_SetString(PySSLErrorObject, - "failed to allocate SSL context"); + _setSSLError(NULL, 0, __FILE__, __LINE__); return NULL; } |