1
0
mirror of https://github.com/moepman/acertmgr.git synced 2024-06-01 12:12:34 +02: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) domaintranslation.append(result)
return domaintranslation return domaintranslation
else: 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) 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] return [(x, x) for x in domainlist]