Update error message to forward platform-specific error

This commit is contained in:
Seth Michael Larson 2023-06-26 22:52:57 -05:00 committed by Seth Michael Larson
parent 9a65b887a4
commit 44857c6e82
No known key found for this signature in database
GPG Key ID: 1C2A4998AD8019F8
1 changed files with 2 additions and 3 deletions

View File

@ -59,10 +59,9 @@ def _create_truststore_ssl_context() -> Optional["SSLContext"]:
try:
from pip._vendor import truststore
except ImportError:
except ImportError as e:
raise CommandError(
"To use the truststore feature, 'truststore' must be installed into "
"pip's current environment."
f"The truststore feature is unavailable: {e}"
)
return truststore.SSLContext(ssl.PROTOCOL_TLS_CLIENT)