for instance in rows:
# Is it there?
logger.debug("instance[]='%s'", type(instance))
+ if not isinstance(instance, dict):
+ logger.warning("instance[]='%s' is not of type 'dict' - SKIPPED!", type(instance))
+ continue
+ elif not "host" in instance:
+ logger.warning("instance()=%d has no element 'host' - SKIPPED!", len(instance))
+ continue
+ elif not isinstance(instance["host"], str):
+ logger.warning("instance[host][]='%s' is not of type 'str' - SKIPPED!", type(instance["host"]))
+ continue
+
+ logger.debug("instance[host]='%s' - BEFORE!", instance["host"])
blocked = tidyup.domain(instance["host"]) if instance["host"] != "" else None
logger.debug("blocked='%s' - AFTER!", blocked)