From 7d8f319b1188af27ea7a98cab877258dcdd5efb1 Mon Sep 17 00:00:00 2001 From: Mariusz Felisiak Date: Wed, 19 Apr 2023 12:04:20 +0200 Subject: [PATCH] Remove redundant assignment in ssl._create_unverified_context(). --- Lib/ssl.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/Lib/ssl.py b/Lib/ssl.py index 896db17baeb3db..bee8622c8e0a05 100644 --- a/Lib/ssl.py +++ b/Lib/ssl.py @@ -758,8 +758,6 @@ def _create_unverified_context(protocol=None, *, cert_reqs=CERT_NONE, context.check_hostname = check_hostname if cert_reqs is not None: context.verify_mode = cert_reqs - if check_hostname: - context.check_hostname = True if keyfile and not certfile: raise ValueError("certfile must be specified")