Include found python and version in SSL_CONTEXT warning. (#24252)
Based on issue 23642, add some info about the used python executable and version to the error message when ssl connection fail in a way that may be related to the version.
This commit is contained in:
parent
261c40bac7
commit
06d70ad95a
1 changed files with 2 additions and 0 deletions
|
@ -571,6 +571,8 @@ def build_ssl_validation_error(hostname, port, paths, exc=None):
|
|||
if not HAS_SSLCONTEXT:
|
||||
msg.append('If the website serving the url uses SNI you need'
|
||||
' python >= 2.7.9 on your managed machine')
|
||||
msg.append(' (the python executable used (%s) is version: %s)' %
|
||||
(sys.executable, ''.join(sys.version.splitlines())))
|
||||
if not HAS_URLLIB3_PYOPENSSLCONTEXT or not HAS_URLLIB3_SSL_WRAP_SOCKET:
|
||||
msg.append('or you can install the `urllib3`, `pyOpenSSL`,'
|
||||
' `ndg-httpsclient`, and `pyasn1` python modules')
|
||||
|
|
Loading…
Reference in a new issue