fix if condition in pretty_domain_name (#1008)
This commit is contained in:
parent
46e51f16cb
commit
ba2423d6f5
1 changed files with 1 additions and 1 deletions
|
|
@ -246,7 +246,7 @@ def pretty_domain_name(value):
|
|||
"""
|
||||
if isinstance(value, str):
|
||||
if value.startswith('xn--') \
|
||||
or value.find('.xn--'):
|
||||
or value.find('.xn--') != -1:
|
||||
try:
|
||||
return value.encode().decode('idna')
|
||||
except:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue