mirror of
https://github.com/cwinfo/powerdns-admin.git
synced 2024-11-08 14:40:27 +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 value.startswith('xn--') \
|
||||
or value.find('.xn--'):
|
||||
or value.find('.xn--') != -1:
|
||||
try:
|
||||
return value.encode().decode('idna')
|
||||
except:
|
||||
|
Loading…
Reference in New Issue
Block a user