From 662919babf9c1d9e4f6eece3d58de64553ac0b09 Mon Sep 17 00:00:00 2001 From: DeeJanuz <45082401+DeeJanuz@users.noreply.github.com> Date: Mon, 5 Oct 2026 13:30:20 -0600 Subject: [PATCH] camcheck: no nested parentheses in the missing cameras' message Co-Authored-By: Claude Opus 5.5 (cherry picked from commit 917ef9d29c339b82cab45d6c427c914e02db7d7e) --- hands/camcheck.py | 2 +- hands/tests/test_camcheck.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hands/camcheck.py b/hands/camcheck.py index ef75980..05643e8 100755 --- a/hands/camcheck.py +++ b/hands/camcheck.py @@ -412,7 +412,7 @@ def check(log=None, proc=True, ring=True, ring_path=None): have = {c["node"] for c in r["mono"]} want = state.tracking_nodes() if state else SIDE_NODES + UPPER_NODES out["ring_missing"] = [n for n in want if n not in have] - status, reason = "degraded", ("ft-camd publishes only %d of %d mono cameras (missing: %s)" % ( + status, reason = "degraded", ("ft-camd publishes only %d of %d mono cameras, missing %s" % ( len(r["mono"]), TRACKING, " ".join("video%d" % n for n in out["ring_missing"]) or "?")) out.update(status=status, reason=reason, evidence=evidence, summary="ok" if status == "ok" else "%s: %s" % (status, reason)) diff --git a/hands/tests/test_camcheck.py b/hands/tests/test_camcheck.py index 69cc887..df63f9d 100644 --- a/hands/tests/test_camcheck.py +++ b/hands/tests/test_camcheck.py @@ -293,7 +293,7 @@ class Ring(unittest.TestCase): r = camcheck.check(log=self.log, proc=False, ring_path=self.ring) self.assertEqual(r["status"], "degraded") self.assertEqual(r["ring_missing"], [0, 3]) - self.assertIn("missing: video0 video3", r["reason"]) + self.assertIn("missing video0 video3", r["reason"]) self.assertTrue(camcheck.is_ring_short(r)) self.assertFalse(camcheck.is_vcint_failure(r)) self.assertEqual(r["map"]["slam_left"]["node"], 0)