From aacbde790c10f15152e4a08306c15226338c03fa Mon Sep 17 00:00:00 2001
From: =?utf8?q?Roland=20H=C3=A4der?= <roland@mxchange.org>
Date: Sun, 7 Jul 2024 22:13:23 +0200
Subject: [PATCH] Continued: - moved args.single handling to proper level -
 wrapped strings in Shell script - explained all entries in .gitignore

---
 .gitignore      | 13 +++++++++++--
 fba/commands.py |  6 +++---
 nodeinfo.sh     | 10 +++++-----
 3 files changed, 19 insertions(+), 10 deletions(-)

diff --git a/.gitignore b/.gitignore
index 9f3aac0..75d4809 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,10 +1,19 @@
+# Local database file
 blocks.db*
+
+# Local configuration file
+config.json
+
+# pyreport report file
+report.log
+
+# WIP:
 blocklists/*/
+
+# Generated files by Python
 __pycache__/
-config.json
 *.cover
 *.pyc
-report.log
 *.log
 
 # Virtual environment
diff --git a/fba/commands.py b/fba/commands.py
index a514c79..8643c30 100644
--- a/fba/commands.py
+++ b/fba/commands.py
@@ -1023,9 +1023,9 @@ def fetch_instances(args: argparse.Namespace) -> int:
             instances.update(row["domain"])
             continue
 
-        if args.single:
-            logger.debug("Not fetching more instances - BREAK!")
-            break
+    if args.single:
+        logger.debug("Not fetching more instances - EXIT!")
+        return 0
 
     # Loop through some instances
     database.cursor.execute(
diff --git a/nodeinfo.sh b/nodeinfo.sh
index adfc385..9712a29 100755
--- a/nodeinfo.sh
+++ b/nodeinfo.sh
@@ -48,12 +48,12 @@ then
 		echo "$0: DOMAIN='${DOMAIN}'"
 		if [ -n "$1" -a -z "${MODE}" ]
 		then
-			./fba.py update_nodeinfo --domain=${DOMAIN} "$1"
+			./fba.py update_nodeinfo --domain="${DOMAIN}" "$1"
 		elif [ -n "$2" ]
 		then
-			./fba.py update_nodeinfo --domain=${DOMAIN} "$2"
+			./fba.py update_nodeinfo --domain="${DOMAIN}" "$2"
 		else
-			./fba.py update_nodeinfo --domain=${DOMAIN}
+			./fba.py update_nodeinfo --domain="${DOMAIN}"
 		fi
 	done
 elif [ -n "${SOFTWARE_LIST}" ]
@@ -63,9 +63,9 @@ then
 		echo "$0: SOFTWARE='${SOFTWARE}'"
 		if [ -n "$2" ]
 		then
-			./fba.py update_nodeinfo --software=${SOFTWARE} "$2"
+			./fba.py update_nodeinfo --software="${SOFTWARE}" "$2"
 		else
-			./fba.py update_nodeinfo --software=${SOFTWARE}
+			./fba.py update_nodeinfo --software="${SOFTWARE}"
 		fi
 	done
 fi
-- 
2.39.5