From 0fb351ef4d0e5a639db7751c8239fd26bce87167 Mon Sep 17 00:00:00 2001 From: Kelly Date: Thu, 26 Feb 2026 20:22:53 -0800 Subject: [PATCH] fix end thanks for issue https://github.com/SpudGunMan/meshing-around/issues/291 --- modules/games/hamtest.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/modules/games/hamtest.py b/modules/games/hamtest.py index fe6090a..ab542ba 100644 --- a/modules/games/hamtest.py +++ b/modules/games/hamtest.py @@ -136,11 +136,16 @@ class HamTest: # remove the game[id] from the list del self.game[id] - # remove the id from the hamtestTracker list if it exists - if id in hamtestTracker: - hamtestTracker.remove(id) + # hamtestTracker stores dicts like {"nodeID": nodeID, ...} + for i in range(len(hamtestTracker)): + try: + if hamtestTracker[i].get('nodeID') == id: + hamtestTracker.pop(i) + break + except Exception: + continue + return msg -hamtestTracker = [] hamtest = HamTest() \ No newline at end of file