diff options
author | Ulysses Souza <ulyssessouza@gmail.com> | 2021-03-10 20:43:37 -0300 |
---|---|---|
committer | Ulysses Souza <ulyssessouza@gmail.com> | 2021-03-22 10:18:23 -0300 |
commit | c8fba210a222d4f7fde90da8f48db1e7faa637ec (patch) | |
tree | c895f87ae9f514e0a47a39326d2a004ffd17275b /docker/context/context.py | |
parent | 31775a1532a66cf8a4c183a99bb5c73623147295 (diff) | |
download | docker-py-set-minimal-python-to-3_6.tar.gz |
Remove support to pre python 3.6set-minimal-python-to-3_6
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
Diffstat (limited to 'docker/context/context.py')
-rw-r--r-- | docker/context/context.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/docker/context/context.py b/docker/context/context.py index b1cacf9..f4aff6b 100644 --- a/docker/context/context.py +++ b/docker/context/context.py @@ -11,6 +11,7 @@ from docker.context.config import get_context_host class Context: """A context.""" + def __init__(self, name, orchestrator=None, host=None, endpoints=None, tls=False): if not name: @@ -128,9 +129,9 @@ class Context: key = os.path.join(tls_dir, endpoint, filename) if all([ca_cert, cert, key]): verify = None - if endpoint == "docker": - if not self.endpoints["docker"].get("SkipTLSVerify", False): - verify = True + if endpoint == "docker" and not self.endpoints["docker"].get( + "SkipTLSVerify", False): + verify = True certs[endpoint] = TLSConfig( client_cert=(cert, key), ca_cert=ca_cert, verify=verify) self.tls_cfg = certs |