From 096d1c882fc92b74093d03480f0328da0ef401e2 Mon Sep 17 00:00:00 2001 From: funman300 Date: Tue, 11 Aug 2026 16:16:10 +0000 Subject: [PATCH] switch: fix the unquoted python string that broke `status` with no --name MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `cmd_status` has two paths. The `--name` path filters on an exact tag and works. The no-name path — the "show me every switch on this box" survey, which is how an orphan switch under a different name would be found — built its python with shell quote-juggling and never closed the string literal, so it died with a SyntaxError every time. It failed loudly (rc=1, a traceback) rather than reporting "no rules", so it never lied about the state. But it also meant the survey path had never once run, which is the more useful lesson: every branch of a safety tool needs exercising, not just the branch the happy path takes. Co-Authored-By: Claude Opus 5 --- openfut-blaze-host/openfut-switch.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openfut-blaze-host/openfut-switch.sh b/openfut-blaze-host/openfut-switch.sh index f8188ee..31bbc1a 100755 --- a/openfut-blaze-host/openfut-switch.sh +++ b/openfut-blaze-host/openfut-switch.sh @@ -129,7 +129,7 @@ print(json.dumps([r for r in json.load(sys.stdin) if r["comment"] in tags])) all="$(rules_json | python3 -c ' import json,sys print(json.dumps([r for r in json.load(sys.stdin) - if (r["comment"] or "").startswith("'"$TAG_PREFIX"':')]))')" + if (r["comment"] or "").startswith("'"$TAG_PREFIX"':")]))')" fi python3 - "$all" "$tag" <<'PY'