mirror of
https://github.com/certbot/certbot.git
synced 2026-06-05 06:42:10 -04:00
s/six\.binary_type/bytes/g
This commit is contained in:
parent
cc2e7e745b
commit
25f497aba7
2 changed files with 3 additions and 3 deletions
|
|
@ -18,11 +18,11 @@ class Validator(object):
|
|||
"""Verifies the certificate presented at name is cert"""
|
||||
if alt_host is None:
|
||||
host = socket.gethostbyname(name).encode()
|
||||
elif isinstance(alt_host, six.binary_type):
|
||||
elif isinstance(alt_host, bytes):
|
||||
host = alt_host
|
||||
else:
|
||||
host = alt_host.encode()
|
||||
name = name if isinstance(name, six.binary_type) else name.encode()
|
||||
name = name if isinstance(name, bytes) else name.encode()
|
||||
|
||||
try:
|
||||
presented_cert = crypto_util.probe_sni(name, host, port)
|
||||
|
|
|
|||
|
|
@ -517,7 +517,7 @@ def enforce_domain_sanity(domain):
|
|||
"""
|
||||
# Unicode
|
||||
try:
|
||||
if isinstance(domain, six.binary_type):
|
||||
if isinstance(domain, bytes):
|
||||
domain = domain.decode('utf-8')
|
||||
domain.encode('ascii')
|
||||
except UnicodeError:
|
||||
|
|
|
|||
Loading…
Reference in a new issue