fix, only add private comment for new blocks
This commit is contained in:
parent
9ca042ab74
commit
9f0c36e751
|
@ -587,10 +587,6 @@ def push_blocklist(token: str, host: str, blocklist: list[DomainBlock],
|
||||||
|
|
||||||
for newblock in blocklist.values():
|
for newblock in blocklist.values():
|
||||||
|
|
||||||
# stamp this record with a private comment
|
|
||||||
if override_private_comment:
|
|
||||||
newblock.private_comment = override_private_comment
|
|
||||||
|
|
||||||
log.debug(f"Processing block: {newblock}")
|
log.debug(f"Processing block: {newblock}")
|
||||||
if newblock.domain in serverblocks:
|
if newblock.domain in serverblocks:
|
||||||
log.debug(f"Block already exists for {newblock.domain}, checking for differences...")
|
log.debug(f"Block already exists for {newblock.domain}, checking for differences...")
|
||||||
|
@ -638,6 +634,10 @@ def push_blocklist(token: str, host: str, blocklist: list[DomainBlock],
|
||||||
log.info(f"Adding new block: {newblock}...")
|
log.info(f"Adding new block: {newblock}...")
|
||||||
log.debug(f"Block as dict: {newblock._asdict()}")
|
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
|
# 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)
|
newblock.severity = check_followed_severity(host, token, newblock.domain, newblock.severity, max_followed_severity, scheme)
|
||||||
if not dryrun:
|
if not dryrun:
|
||||||
|
|
Loading…
Reference in New Issue