logger.warning("Exception '%s' during fetching nodeinfo from domain='%s'", type(exception), domain)
instances.set_last_error(domain, exception)
+ logger.debug("rows[]='%s'", type(rows))
if rows is None:
logger.warning("Could not fetch nodeinfo from domain='%s' - EXIT!", domain)
return list()
logger.warning("rows()=%d does not have key 'federation', domain='%s' - EXIT!", len(rows["metadata"]), domain)
return list()
- data = rows["metadata"]["federation"]
found = False
-
+ data = rows["metadata"]["federation"]
logger.debug("data[]='%s'", type(data))
+
if "mrf_simple" in data:
logger.debug("Found mrf_simple in API response from domain='%s'", domain)
found = True
logger.debug("Invoking utils.deobfuscate(%s, %s) ...", blocked, domain)
blocked = utils.deobfuscate(blocked, domain)
- logger.debug("blocked='%s' - DEOBFUSCATED!", blocked)
+ logger.debug("blocked[%s]='%s' - DEOBFUSCATED!", type(blocked), blocked)
if blocked in [None, ""]:
logger.warning("instance[host]='%s' is None or empty after tidyup.domain() - SKIPPED!", instance["host"])
for blocked in data["quarantined_instances"]:
logger.debug("blocked='%s' - BEFORE!", blocked)
blocked = tidyup.domain(blocked) if blocked != "" else None
-
logger.debug("blocked='%s' - AFTER!", blocked)
+
if blocked in [None, ""]:
logger.warning("blocked is empty after tidyup.domain(): domain='%s',block_level='%s'", domain, block_level)
continue
rows = data["quarantined_instances_info"]["quarantined_instances"]
for blocked in rows:
logger.debug("blocked='%s' - BEFORE!", blocked)
- reason = tidyup.reason(rows[blocked]["reason"])
+ reason = tidyup.reason(rows[blocked]["reason"]) if rows[blocked]["reason"] != "" else None
blocked = tidyup.domain(blocked) if blocked != "" else None
logger.debug("blocked='%s',reason='%s' - AFTER!", blocked, reason)
if len(blocklist) > 0:
logger.info("Checking %d different blocklist(s) ...", len(blocklist))
for block_level in blocklist:
- logger.debug("block_level='%s'", block_level)
- rows = blocklist[block_level]
-
- logger.debug("rows[%s]()=%d'", type(rows), len(rows))
- for block in rows:
+ logger.debug("Checking blocklist[%s]()=%d entries ...", block_level, 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({
"blocker" : domain,
for line in header.find_next("table").find_all("tr")[1:]:
logger.debug("line[]='%s'", type(line))
blocked = line.find_all("td")[0].text
- logger.debug("blocked='%s'", blocked)
+ reason = line.find_all("td")[1].text
+ logger.debug("blocked='%s',reason='%s'", blocked, reason)
blocked = tidyup.domain(blocked) if blocked != "" else None
- reason = tidyup.reason(line.find_all("td")[1].text)
+ reason = tidyup.reason(reason) if reason != "" else None
logger.debug("blocked='%s',reason='%s' - AFTER!", blocked, reason)
- if blocked is None or blocked == "":
- logger.debug("domain='%s',block_level='%s': blocked is empty - SKIPPED!", domain, block_level)
+ if blocked in [None, ""]:
+ logger.debug("domain='%s',block_level='%s': blocked='%s' is empty - SKIPPED!", domain, block_level, blocked)
continue
elif not domain_helper.is_wanted(blocked):
logger.debug("blocked='%s' is not wanted - SKIPPED!", blocked)