From: Roland Häder Date: Tue, 15 Aug 2023 17:48:01 +0000 (+0200) Subject: Fixed: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=ce8867063ef798d15ce07dd573e65a647090a3a7;p=fba.git Fixed: - ops, didn't notice the inverted function name (my fault) - also added proper debug message --- diff --git a/fba/commands.py b/fba/commands.py index 78ef33a..9d37cb7 100644 --- a/fba/commands.py +++ b/fba/commands.py @@ -321,7 +321,7 @@ def fetch_blocks(args: argparse.Namespace) -> int: blocking = list() - if federation.is_excluded_blocklist(blocker): + if not federation.is_excluded_blocklist(blocker): logger.debug("blocker='%s',software='%s'", blocker, software) if software == "pleroma": logger.info("blocker='%s',software='%s'", blocker, software) @@ -1095,7 +1095,7 @@ def fetch_oliphant(args: argparse.Namespace) -> int: processing.block(block["blocker"], domain, None, "reject_reports") logger.debug("block[blocker]='%s'", block["blocker"]) - if blocklists.is_excluded(block["blocker"]): + if not blocklists.is_excluded(block["blocker"]): logger.debug("Invoking instances.set_total_blocks(%s, domains()=%d) ...", block["blocker"], len(domains)) instances.set_total_blocks(block["blocker"], domains) @@ -1540,7 +1540,7 @@ def recheck_obfuscation(args: argparse.Namespace) -> int: logger.debug("row[domain]='%s'", row["domain"]) # chaos.social requires special care ... - if blocklists.is_excluded(row["domain"]): + if not blocklists.is_excluded(row["domain"]): logger.debug("Invoking instances.set_total_blocks(%s, %d) ...", row["domain"], len(blocking)) instances.set_last_blocked(row["domain"]) instances.set_total_blocks(row["domain"], blocking) diff --git a/fba/helpers/blocklists.py b/fba/helpers/blocklists.py index a060a4e..309f8a6 100644 --- a/fba/helpers/blocklists.py +++ b/fba/helpers/blocklists.py @@ -85,6 +85,7 @@ def is_excluded(domain: str) -> bool: logger.debug("row[blocker]='%s',domain='%s'", row["blocker"], domain) if row["blocker"] == domain: excluded = True + logger.debug("domain='%s' is excluded from regular fetch_blocks command - BREAK!", domain) break logger.debug("excluded='%s' - EXIT!")