headers,
(config.get("connection_timeout"), config.get("read_timeout"))
)
+ rows = list()
logger.debug("data[]='%s'", type(data))
if "error_message" in data:
instances.set_last_error(domain, data)
return blocklist
elif "json" in data and "error" in data["json"]:
- logger.warning("JSON API returned error message: '%s'", data['json']['error'])
+ logger.warning("JSON API returned error message: '%s'", data["json"]["error"])
instances.set_last_error(domain, data)
return blocklist
else:
logger.debug("Marking domain='%s' as successfully handled ...", domain)
instances.set_success(domain)
+ logger.debug("rows[%s]()=%d", type(rows), len(rows))
if len(rows) == 0:
logger.debug("domain='%s' has returned zero rows, trying /about/more page ...", domain)
rows = fetch_blocks_from_about(domain)
+ logger.debug("rows[%s]()=%d", type(rows), len(rows))
if len(rows) > 0:
logger.debug("Checking %d entries from domain='%s' ...", len(rows), domain)
for block in rows:
if not isinstance(block, dict):
logger.debug("block[]='%s' is of type 'dict' - SKIPPED!", type(block))
continue
+ elif "domain" not in block:
+ logger.warning("block()=%d does not contain element 'domain'", len(block))
+ elif "severity" not in block:
+ logger.warning("block()=%d does not contain element 'severity'", len(block))
reason = tidyup.reason(block["comment"]) if "comment" in block and block["comment"] is not None and block["comment"] != "" else None