Skip to content
This repository was archived by the owner on May 21, 2023. It is now read-only.

Commit dc33de0

Browse files
authored
Merge branch 'master' into py36
2 parents d9a4d4b + 89aa295 commit dc33de0

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎urllib3/contrib/pyopenssl.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343
"""
4444
from __future__ import absolute_import
4545

46-
import idna
4746
import OpenSSL.SSL
4847
from cryptography import x509
4948
from cryptography.hazmat.backends.openssl import backend as openssl_backend
@@ -165,6 +164,8 @@ def idna_encode(name):
165164
that we can't just safely call `idna.encode`: it can explode for
166165
wildcard names. This avoids that problem.
167166
"""
167+
import idna
168+
168169
for prefix in [u'*.', u'.']:
169170
if name.startswith(prefix):
170171
name = name[len(prefix):]

0 commit comments

Comments
 (0)