From: Roland Häder Date: Tue, 11 Jul 2023 10:22:24 +0000 (+0200) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=6c6f7600a800fc622cdffddf8cfc8e291bcf6c0c;p=fba.git Continued: - strip off leading dots as the IDNA encoder gets confused about it --- diff --git a/fba/commands.py b/fba/commands.py index 4d4f01f..12caa75 100644 --- a/fba/commands.py +++ b/fba/commands.py @@ -402,7 +402,7 @@ def fetch_blocks(args: argparse.Namespace) -> int: continue logger.debug("block[blocked]='%s' - BEFORE!", block["blocked"]) - block["blocked"] = block["blocked"].encode("idna").decode("utf-8") + block["blocked"] = block["blocked"].lstrip(".").encode("idna").decode("utf-8") logger.debug("block[blocked]='%s' - AFTER!", block["blocked"]) if not utils.is_domain_wanted(block["blocked"]):