From: Roland Häder Date: Tue, 1 Oct 2024 17:00:37 +0000 (+0200) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=b4f7746d79385b110329ed6578bdefaab5a945da;p=fba.git Continued: - now also command recheck_obfuscation() is updating/adding 'obfucated' a record --- diff --git a/fba/commands.py b/fba/commands.py index d862ce1..5efea1b 100644 --- a/fba/commands.py +++ b/fba/commands.py @@ -1440,11 +1440,19 @@ def recheck_obfuscation(args: argparse.Namespace) -> int: logger.debug("block[block_level]='%s' - AFTER!", block["block_level"]) if processing.block(row["domain"], blocked, block["reason"], block["block_level"]) and block["block_level"] in ["suspended", "rejected"] and config.get("bot_enabled"): - logger.debug("Appending blocked='%s',reason='%s' for blocker='%s' ...", block["blocked"], block["block_level"], row["domain"]) + logger.debug("Appending blocked='%s',reason='%s' for blocker='%s' ...", blocked, block["block_level"], row["domain"]) blockdict.append({ "blocked": blocked, "reason" : block["reason"], }) + elif blocked is not None: + logger.debug("blocked='%s' is maybe added and needs update.", blocked) + if not obfuscation.is_added(block["blocked"]): + logger.debug("Invoking obfuscation.add(%s) ...", block["blocked"]) + obfuscation.add(block["blocked"]) + else: + logger.debug("Invoking obfuscation.update(%s) ...", block["blocked"]) + obfuscation.update(block["blocked"]) logger.debug("Setting obfuscated=%d for row[domain]='%s' ...", obfuscated, row["domain"]) instances.set_obfuscated_blocks(row["domain"], obfuscated)