reason = tidyup.reason(line.find_all("td")[1].text)
logger.debug("blocked='%s',reason='%s' - AFTER!", blocked, reason)
- if blocked is None:
- logger.warning("blocked is empty - SKIPPED!")
- continue
- elif blocked == "":
+ if blocked is None or blocked == "":
logger.warning("line[]='%s' returned empty blocked domain - SKIPPED!", type(line))
continue
elif not domain_helper.is_wanted(blocked):
blocked = tidyup.domain(tag.contents[0]) if tag.contents[0] != "" else None
logger.debug("blocked='%s'", blocked)
- if blocked is None:
- logger.warning("blocked is empty - SKIPPED!")
- continue
- elif blocked == "":
+ if blocked is None or blocked == "":
logger.warning("blocked='%s' is empty after tidyup.domain() - SKIPPED!", tag.contents[0])
continue
elif not domain_helper.is_wanted(blocked):
peer = tidyup.domain(text) if text != "" else None
logger.debug("peer='%s' - AFTER", peer)
- if peer is None:
- logger.warning("peer is empty - SKIPPED!")
- continue
- elif peer == "":
- logger.warning("peer is an empty string, text='%s' - SKIPPED!", text)
+ if peer is None or peer == "":
+ logger.warning("peer='%s' is empty, text='%s' - SKIPPED!", peer, text)
continue
elif not domain_helper.is_wanted(peer):
logger.debug("peer='%s' is not wanted - SKIPPED!", peer)
peer = tidyup.domain(row["domain"])
logger.debug("peer='%s' - AFTER!", peer)
- if peer is None:
- logger.warning("peer is empty - SKIPPED!")
- continue
- elif peer == "":
- logger.warning("peer is an empty string, row[domain]='%s' - SKIPPED!", row["domain"])
+ if peer is None or peer == "":
+ logger.warning("peer='%s' is empty, row[domain]='%s' - SKIPPED!", peer, row["domain"])
continue
elif not domain_helper.is_wanted(peer):
logger.debug("peer='%s' is not wanted - SKIPPED!", peer)
reason = tidyup.reason(reason) if reason != "" else None
logger.debug("domain='%s',reason='%s' - AFTER!", domain, reason)
- if domain is None:
- logger.warning("domain is empty,line='%s' - SKIPPED!", line)
- continue
- elif domain == "":
- logger.warning("domain is an empty string,line='%s' - SKIPPED!", line)
+ if domain is None or domain == "":
+ logger.warning("domain='%s' is empty,line='%s' - SKIPPED!", domain, line)
continue
logger.debug("Appending domain='%s',hash='%s',reason='%s' to blocklist header_text='%s' ...", domain, hash, reason, blocklist)
blocked = tidyup.domain(blocked) if blocked != "" else None
logger.debug("blocked='%s' - AFTER!", blocked)
- if blocked is None:
- logger.warning("blocked is empty - SKIPPED!")
- continue
- elif blocked == "":
- logger.warning("blocked is an empty string after tidyup.domain(): domain='%s',block_level='%s' - SKIPPED!", domain, block_level)
+ if blocked is None or blocked == "":
+ logger.warning("blocked='%s' is empty after tidyup.domain(): domain='%s',block_level='%s' - SKIPPED!", blocked, domain, block_level)
continue
logger.debug("Invoking utils.deobfuscate(%s, %s) ...", blocked, domain)
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 == "":
+ logger.debug("blocked='%s' - AFTER!", blocked)
+ if blocked is None or blocked == "":
logger.warning("blocked is empty after tidyup.domain(): domain='%s',block_level='%s'", domain, block_level)
continue
elif not domain_helper.is_wanted(blocked):