From f41861876a21233bdbb8ce7e22505b04a0684ea5 Mon Sep 17 00:00:00 2001 From: Thomas Farstrike <111072251+ThomasFarstrike@users.noreply.github.com> Date: Fri, 7 Nov 2025 08:02:35 +0100 Subject: [PATCH] Update task_handler.py Fix issue #351 --- api_drivers/common_api_drivers/frozen/other/task_handler.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/api_drivers/common_api_drivers/frozen/other/task_handler.py b/api_drivers/common_api_drivers/frozen/other/task_handler.py index 67c85fa3..99e9f4a1 100644 --- a/api_drivers/common_api_drivers/frozen/other/task_handler.py +++ b/api_drivers/common_api_drivers/frozen/other/task_handler.py @@ -82,9 +82,9 @@ def add_event_cb(self, callback, event, user_data=_DefaultUserData): self._callbacks.append((callback, event, user_data)) def remove_event_cb(self, callback): - for i, obj in self._callbacks: - if obj[0] == callback: - self._callbacks.remove(obj) + for (cb, evt, data) in self._callbacks: + if cb == callback: + self._callbacks.remove((cb,evt,data)) break def deinit(self):