Skip to content

Commit

Permalink
Update error message to forward platform-specific error
Browse files Browse the repository at this point in the history
  • Loading branch information
sethmlarson committed Jun 27, 2023
1 parent 157e322 commit a1c537d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/pip/_internal/cli/req_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -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: {str(e)}"
)

return truststore.SSLContext(ssl.PROTOCOL_TLS_CLIENT)
Expand Down

0 comments on commit a1c537d

Please sign in to comment.