]> git.mxchange.org Git - fba.git/commitdiff
Fixed:
authorRoland Häder <roland@mxchange.org>
Tue, 15 Aug 2023 17:48:01 +0000 (19:48 +0200)
committerRoland Häder <roland@mxchange.org>
Tue, 15 Aug 2023 17:48:01 +0000 (19:48 +0200)
- ops, didn't notice the inverted function name (my fault)
- also added proper debug message

fba/commands.py
fba/helpers/blocklists.py

index 78ef33a6d739a2cf0724bd8a00aa01d3ccbe7d10..9d37cb757a392f51eef5d46a9b61a81035fb377a 100644 (file)
@@ -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)
index a060a4e328a8df2a8e9cb66e2c6df2d62d828853..309f8a68ea5be4057c12ea9a063ba544d77d4aed 100644 (file)
@@ -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!")