mirror of
https://github.com/openSUSE/osc.git
synced 2024-11-14 08:16:15 +01:00
Merge pull request #1180 from dmach/fix-sys.version_info-cmp
oscssl: Fix sys.version_info comparison
This commit is contained in:
commit
532f99e13f
@ -29,7 +29,7 @@ def create_ssl_context():
|
|||||||
"""
|
"""
|
||||||
ssl_context = create_urllib3_context()
|
ssl_context = create_urllib3_context()
|
||||||
# we consider anything older than TLSv1_2 insecure
|
# we consider anything older than TLSv1_2 insecure
|
||||||
if sys.version_info <= (3, 6):
|
if sys.version_info[:2] <= (3, 6):
|
||||||
# deprecated since py3.7
|
# deprecated since py3.7
|
||||||
ssl_context.options |= ssl.OP_NO_TLSv1
|
ssl_context.options |= ssl.OP_NO_TLSv1
|
||||||
ssl_context.options |= ssl.OP_NO_TLSv1_1
|
ssl_context.options |= ssl.OP_NO_TLSv1_1
|
||||||
|
Loading…
Reference in New Issue
Block a user