mirror of
https://github.com/ansible-collections/community.docker.git
synced 2026-07-29 11:55:04 +00:00
Avoid Python 2 compat (conditional) imports. (#1167)
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import unittest
|
||||
from ssl import OP_NO_SSLv2, OP_NO_SSLv3, OP_NO_TLSv1
|
||||
|
||||
import pytest
|
||||
|
||||
@@ -24,13 +25,6 @@ except ImportError:
|
||||
else:
|
||||
HAS_MATCH_HOSTNAME = True # pylint: disable=invalid-name
|
||||
|
||||
try:
|
||||
from ssl import OP_NO_SSLv2, OP_NO_SSLv3, OP_NO_TLSv1
|
||||
except ImportError:
|
||||
OP_NO_SSLv2 = 0x1000000
|
||||
OP_NO_SSLv3 = 0x2000000
|
||||
OP_NO_TLSv1 = 0x4000000
|
||||
|
||||
|
||||
class SSLAdapterTest(unittest.TestCase):
|
||||
def test_only_uses_tls(self):
|
||||
|
||||
Reference in New Issue
Block a user