# c.s isn't part of oliphant's "hidden" blocklists
if blocker == "chaos.social" or software_helper.is_relay(software) or blocklists.has(blocker):
- logger.debug("Skipping blocker='%s', run ./fba.py fetch_cs or fetch_oliphant instead!", blocker)
+ logger.debug("Skipping blocker='%s', run ./fba.py fetch_cs, fetch_oliphant, fetch_csv instead!", blocker)
continue
logger.debug("Invoking federation.fetch_blocks(%s) ...", blocker)
severity = "reject"
if "reason" in row:
- reason = tidup.reason(row["reason"]) if row["reason"] != None and row["reason"] != "" else None
+ reason = tidyup.reason(row["reason"]) if row["reason"] != None and row["reason"] != "" else None
elif "comment" in row:
- reason = tidup.reason(row["comment"]) if row["comment"] != None and row["comment"] != "" else None
+ reason = tidyup.reason(row["comment"]) if row["comment"] != None and row["comment"] != "" else None
elif "Comment" in row:
- reason = tidup.reason(row["Comment"]) if row["Comment"] != None and row["Comment"] != "" else None
+ reason = tidyup.reason(row["Comment"]) if row["Comment"] != None and row["Comment"] != "" else None
else:
logger.debug("row='%s' has no reason/comment key provided", row)
domain = utils.deobfuscate(domain, blocker)
logger.debug("domain='%s' - AFTER!", domain)
+ logger.debug("Marking domain='%s' as handled", domain)
+ domains.append(domain)
+
if not validators.domain(domain):
logger.debug("domain='%s' is not a valid domain - SKIPPED!")
continue
logger.debug("blocker='%s' has already blocked domain='%s' with severity='%s' - SKIPPED!", blocker, domain, severity)
continue
- logger.debug("Marking domain='%s' as handled", domain)
- domains.append(domain)
-
logger.debug("Processing domain='%s',blocker='%s',command='%s' ...", domain, blocker, command)
processed = instance(domain, blocker, command)
logger.debug("processed='%s'", processed)
if reject_reports:
block(blocker, domain, None, "reject_reports")
+ logger.debug("Invoking commit() ...")
+ database.connection.commit()
+
logger.debug("blocker='%s'", blocker)
- if not blocklists.has(blocker):
+ if blocklists.has(blocker):
logger.debug("Invoking instances.set_total_blocks(%s, domains()=%d) ...", blocker, len(domains))
instances.set_total_blocks(blocker, domains)
logger.debug("Flushing updates for blocker='%s' ...", blocker)
instances.update(blocker)
- logger.debug("Invoking commit() ...")
- database.connection.commit()
-
logger.debug("config.get(bot_enabled)='%s',blockdict()=%d", config.get("bot_enabled"), len(blockdict))
if config.get("bot_enabled") and len(blockdict) > 0:
logger.info("Sending bot POST for blocker='%s',blockdict()=%d ...", blocker, len(blockdict))