mirror of
https://github.com/cwinfo/powerdns-admin.git
synced 2025-01-08 03:15:40 +00:00
fix if condition in pretty_domain_name (#1008)
This commit is contained in:
parent
46e51f16cb
commit
ba2423d6f5
@ -246,7 +246,7 @@ def pretty_domain_name(value):
|
|||||||
"""
|
"""
|
||||||
if isinstance(value, str):
|
if isinstance(value, str):
|
||||||
if value.startswith('xn--') \
|
if value.startswith('xn--') \
|
||||||
or value.find('.xn--'):
|
or value.find('.xn--') != -1:
|
||||||
try:
|
try:
|
||||||
return value.encode().decode('idna')
|
return value.encode().decode('idna')
|
||||||
except:
|
except:
|
||||||
|
Loading…
Reference in New Issue
Block a user