From 0b8e49d6ee7b2b23758a8df58edae47cbe09c071 Mon Sep 17 00:00:00 2001 From: Kishi85 Date: Tue, 11 Jun 2019 10:04:48 +0200 Subject: [PATCH] tools: Display warning about IDNA only if unicode names are in use --- acertmgr/tools.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/acertmgr/tools.py b/acertmgr/tools.py index b9515c2..efe0360 100644 --- a/acertmgr/tools.py +++ b/acertmgr/tools.py @@ -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]