From d92f1b18580940c27f303f1dfcf47bb66e508ce4 Mon Sep 17 00:00:00 2001 From: Eugenio Lacuesta Date: Thu, 8 Aug 2019 23:53:35 -0300 Subject: [PATCH] Simplify import + assignment --- scrapy/core/downloader/tls.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scrapy/core/downloader/tls.py b/scrapy/core/downloader/tls.py index 1c3d94b29..4ed482058 100644 --- a/scrapy/core/downloader/tls.py +++ b/scrapy/core/downloader/tls.py @@ -29,8 +29,7 @@ openssl_methods = { if twisted_version < (17, 0, 0): - from twisted.internet._sslverify import _maybeSetHostNameIndication - set_tlsext_host_name = _maybeSetHostNameIndication + from twisted.internet._sslverify import _maybeSetHostNameIndication as set_tlsext_host_name else: def set_tlsext_host_name(connection, hostNameBytes): connection.set_tlsext_host_name(hostNameBytes)