if "host" not in row:
logger.warning("row='%s' does not contain key 'host' - SKIPPED!", row)
continue
+ elif row["host"] in [None, ""]:
+ logger.warning("row[host]='%s' is empty,source_domain='%s' - SKIPPED!", row["host"], source_domain)
+ continue
elif not domain_helper.is_wanted(row["host"]):
logger.debug("row[host]='%s' is not wanted - SKIPPED!", row["host"])
continue
"menzoberranzan",
"moon-eyed",
"puppyoma",
+ "cafkoma",
]
logging.basicConfig(level=logging.INFO)
logger.warning("row()=%d does not contain key 'host': row='%s',domain='%s' - SKIPPED!", len(row), row, domain)
continue
elif not isinstance(row["host"], str):
- logger.warning("row[host][]='%s' has not expected type 'str' - SKIPPED!", type(row['host']))
+ logger.warning("row[host][]='%s' has not expected type 'str' - SKIPPED!", type(row["host"]))
+ continue
+ elif row["host"] in [None, ""]:
+ logger.warning("row[host]='%s' is empty,domain='%s' - SKIPPED!", row["host"], domain)
continue
elif row["host"] in peers:
- logger.debug("Not adding row[host]='%s', already found - SKIPPED!", row['host'])
+ logger.debug("Not adding row[host]='%s', already found - SKIPPED!", row["host"])
continue
elif not domain_helper.is_wanted(row["host"]):
logger.debug("row[host]='%s' is not wanted - SKIPPED!", row["host"])
continue
- logger.debug("Adding peer: row[host]='%s'", row['host'])
+ logger.debug("Adding peer: row[host]='%s'", row["host"])
added = added + 1
peers.append(row["host"])
for mode2 in ["follower", "following"]:
logger.debug("mode=%s,mode2='%s'", mode, mode2)
if mode2 not in record:
- logger.debug("Array record does not contain element mode2='%s' - SKIPPED!", mode2)
+ logger.warning("Array record does not contain element mode2='%s' - SKIPPED!", mode2)
continue
elif "host" not in record[mode2]:
- logger.debug("record[%s] does not contain element 'host' - SKIPPED!", mode2)
+ logger.warning("record[%s] does not contain element 'host' - SKIPPED!", mode2)
+ continue
+ elif record[mode2]["host"] in [None, ""]:
+ logger.warning("record[%s][host]='%s' is empty - SKIPPED!", mode2, record[mode2]["host"])
continue
elif record[mode2]["host"] == domain:
logger.debug("record[%s]='%s' matches domain='%s' - SKIPPED!", mode2, record[mode2]["host"], domain)