From 2a96ea724520712144ead86d3d866ebf487877fb Mon Sep 17 00:00:00 2001 From: Shawn Grigson Date: Sun, 10 Sep 2023 18:06:51 -0500 Subject: [PATCH] add private comment to proper place for debugging --- src/fediblockhole/__init__.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/fediblockhole/__init__.py b/src/fediblockhole/__init__.py index ce805cf..778c587 100755 --- a/src/fediblockhole/__init__.py +++ b/src/fediblockhole/__init__.py @@ -625,15 +625,15 @@ def push_blocklist(token: str, host: str, blocklist: list[DomainBlock], pass else: + # stamp this record with a private comment, since we're the ones adding it + if override_private_comment: + newblock.private_comment = override_private_comment + # This is a new block for the target instance, so we # need to add a block rather than update an existing one log.info(f"Adding new block: {newblock}...") log.debug(f"Block as dict: {newblock._asdict()}") - # stamp this record with a private comment, since we're the ones adding it - if override_private_comment: - newblock.private_comment = override_private_comment - # Make sure the new block doesn't clobber a domain with followers newblock.severity = check_followed_severity(host, token, newblock.domain, newblock.severity, max_followed_severity, scheme) if not dryrun: