From 65e73ecfb8dbe663972ceed88e027344ac0106f2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Mon, 10 Jul 2023 23:06:51 +0200 Subject: [PATCH] Continued: - fixed missing dict key element - added debug messages --- fba/commands.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fba/commands.py b/fba/commands.py index 41f03f4..f80c89a 100644 --- a/fba/commands.py +++ b/fba/commands.py @@ -1294,8 +1294,10 @@ def fetch_joinfediverse(args: argparse.Namespace) -> int: logger.debug("block='%s'", block) if "subdomain(s)" in block and len(block["subdomain(s)"]) > 0: origin = block["blocked"] + logger.debug("origin='%s'", origin) for subdomain in block["subdomain(s)"]: block["blocked"] = subdomain + "." + origin + logger.debug("block[blocked]='%s'", block["blocked"]) blocking.append(block) else: blocking.append(block) @@ -1325,7 +1327,7 @@ def fetch_joinfediverse(args: argparse.Namespace) -> int: logger.debug("blocker[%s]='%s'", type(blocker), blocker) for block in blocking: - logger.debug("block[blocked]='%s',block[reason]='%s' - BEFORE!", block["blocked"], block["reason"]) + logger.debug("block[blocked]='%s',block[block reason(s)]='%s' - BEFORE!", block["blocked"], block["block reason(s)"] if "block reason(s)" in block else None) block["reason"] = tidyup.reason(block["block reason(s)"]) if "block reason(s)" in block else None logger.debug("block[blocked]='%s',block[reason]='%s' - AFTER!", block["blocked"], block["reason"]) -- 2.39.5