logger.debug(f"block[]='{type(block)}' is of type 'dict' - SKIPPED!")
continue
- reason = tidyup.reason(block["comment"]) if "comment" in block else None
+ reason = tidyup.reason(block["comment"]) if "comment" in block and block['comment'] is not None and block['comment'] != "" else None
logger.debug("Appending blocker='%s',blocked='%s',reason='%s',block_level='%s'", domain, block['domain'], reason, block['severity'])
blocklist.append({
else:
logger.debug("domain='%s' has no block list")
- logger.info("Checking %d entries from domain='%s' ...", len(blocklist), domain)
- for block in blocklist:
- logger.debug("blocker='%s',blocked='%s',reason='%s',block_level='%s'", block['blocker'], block['blocked'], block['reason'], block['block_level'])
- block['blocked'] = tidyup.domain(block['blocked'])
- block['reason'] = tidyup.reason(block['reason'])
- logger.debug("blocked='%s',reason='%s' - AFTER!", block['blocked'], block['reason'])
-
except network.exceptions as exception:
logger.warning("domain='%s',exception[%s]='%s'", domain, type(exception), str(exception))
instances.set_last_error(domain, exception)