Skip to content

Commit def9633

Browse files
committed
To improve readability, add a new key while keeping the existing one
1 parent db8e2a6 commit def9633

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/requests/help.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,8 @@ def info():
9696
openssl_version = OpenSSL.SSL.SSLeay_version(OpenSSL.SSL.SSLEAY_VERSION).decode("utf-8")
9797
pyopenssl_info = {
9898
"version": OpenSSL.__version__,
99-
"openssl_version": f"{openssl_version}",
99+
"openssl_version": f"{OpenSSL.SSL.OPENSSL_VERSION_NUMBER:x}",
100+
"openssl_version_readable": openssl_version
100101
}
101102
cryptography_info = {
102103
"version": getattr(cryptography, "__version__", ""),
@@ -105,8 +106,11 @@ def info():
105106
"version": getattr(idna, "__version__", ""),
106107
}
107108

108-
system_ssl = ssl.OPENSSL_VERSION
109-
system_ssl_info = {"version": f"{system_ssl}"}
109+
system_ssl = ssl.OPENSSL_VERSION_NUMBER
110+
system_ssl_info = {
111+
"version": f"{system_ssl:x}" if system_ssl is not None else "",
112+
"version_readable": ssl.OPENSSL_VERSION
113+
}
110114

111115
return {
112116
"platform": platform_info,

0 commit comments

Comments
 (0)