for entry in rows["data"]["nodeinfo"]:
# DEBUG: print(f"DEBUG: entry['{type(entry)}']='{entry}'")
- if not "domain" in entry:
+ if "domain" not in entry:
print(f"WARNING: entry()={len(entry)} does not contain 'domain' - SKIPPED!")
continue
elif not validators.domain(entry["domain"]):
)
# DEBUG: print("DEBUG: href,data[]:", link["href"], type(data))
- if not "error_message" in data and "json" in data:
+ if "error_message" not in data and "json" in data:
# DEBUG: print("DEBUG: Found JSON nodeinfo():", len(data))
instances.set_detection_mode(domain, "AUTO_DISCOVERY")
instances.set_nodeinfo_url(domain, link["href"])
def remove(software: str) -> str:
# DEBUG: print(f"DEBUG: software='{software}' - CALLED!")
- if not "." in software and " " not in software:
+ if "." not in software and " " not in software:
print(f"WARNING: software='{software}' does not contain a version number.")
return software
# DEBUG: print(f"DEBUG: rows({len(rows)})[]='{type(rows)}'")
for row in rows:
# DEBUG: print(f"DEBUG: row()={len(row)}")
- if not "host" in row:
+ if "host" not in row:
print(f"WARNING: row()={len(row)} does not contain key 'host': {row},domain='{domain}'")
continue
elif not isinstance(row["host"], str):