blocked = tidyup.domain(blocked) if blocked != "" else None
logger.debug("blocked='%s',reason='%s' - AFTER!", blocked, reason)
- if blocked not in rows or "reason" not in rows[blocked]:
- logger.warning("Cannot find blocked='%s' in rows()=%d,domain='%s' - BREAK!", blocked, len(rows), domain)
- break
- elif blocked in [None, ""]:
+ if blocked in [None, ""]:
logger.warning("blocked[%s]='%s' is empty after tidyup.domain(): domain='%s',block_level='%s'", type(blocked), blocked, domain, block_level)
continue
+ elif "reason" not in rows[blocked]:
+ logger.warning("Cannot find 'reason' in rows[%s]()=%d,domain='%s' - BREAK!", blocked, len(rows[blocked]), domain)
+ break
logger.debug("Checking %d blockdict record(s) ...", len(blockdict))
for block in blockdict:
if len(blocklist) > 0:
logger.info("Checking %d different blocklist(s) ...", len(blocklist))
for block_level in blocklist:
- logger.debug("Checking blocklist[%s]()=%d entries ...", block_level, blocklist[block_level])
+ logger.debug("Checking blocklist[%s]()=%d entries ...", block_level, len(blocklist[block_level]))
for block in blocklist[block_level]:
logger.debug("Appending blocker='%s',block[blocked]='%s',block[reason]='%s',block_level='%s' ...",domain, block["blocked"], block["reason"], block_level)
blockdict.append({