From 73f0d8568407ea75b296e50e178d50ba3134fb5d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sat, 5 Jul 2025 21:23:46 +0200 Subject: [PATCH] Continued: - don't continue with empty software name (empty string, not None type) --- fba/commands.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fba/commands.py b/fba/commands.py index 4997215..5b02476 100644 --- a/fba/commands.py +++ b/fba/commands.py @@ -320,7 +320,7 @@ def fetch_blocks(args: argparse.Namespace) -> int: elif not args.force_all and instances.is_recent(row["domain"], "last_blocked"): logger.debug("row[domain]='%s' has recently been crawled - SKIPPED!", row["domain"]) continue - elif row["software"] is None: + elif row["software"] in [None, ""]: logger.debug("row[domain]='%s' has no software set - SKIPPED!", row["domain"]) continue @@ -1049,6 +1049,7 @@ def fetch_instances(args: argparse.Namespace) -> int: rows = database.cursor.fetchall() else: # Loop through some instances + logger.debug("Querying database for peer sources ...") database.cursor.execute("SELECT domain, origin, software \ FROM instances \ WHERE software IN ( \ @@ -1065,7 +1066,7 @@ ORDER BY total_peers DESC, last_response_time ASC, last_updated ASC" logger.info("Checking %d entries ...", len(rows)) for row in rows: logger.debug("row[domain]='%s',row[origin]='%s',row[software]='%s'", row["domain"], row["origin"], row["software"]) - if row["software"] is None: + if row["software"] in [None, ""]: logger.warning("row[domain]='%s' has no software detected. You can try to run ./fba.py update_nodeinfo --domain=%s --force-all to get it updated - SKIPPED!", row["domain"], row["domain"]) continue elif software_helper.is_relay(row["software"]): -- 2.39.5