tools: Display warning about IDNA only if unicode names are in use

This commit is contained in:
Kishi85 2019-06-11 10:04:48 +02:00
parent af0bb45d73
commit 0b8e49d6ee
1 changed files with 1 additions and 1 deletions

View File

@ -373,6 +373,6 @@ def idna_convert(domainlist):
domaintranslation.append(result)
return domaintranslation
else:
if 'idna' not in sys.modules:
if any(ord(c) >= 128 for c in ''.join(domainlist)) and 'idna' not in sys.modules:
log("Unicode domain(s) found but IDNA names could not be translated due to missing idna module", error=True)
return [(x, x) for x in domainlist]