1
0
mirror of https://github.com/moepman/acertmgr.git synced 2024-12-28 18:21:51 +01:00

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

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]