Files
MicroPythonOS/patches/task_handler.p_fix_remove_callback
T
Thomas Farstrike fdd42d8914 add some patches
2025-06-13 09:52:08 +02:00

18 lines
757 B
Plaintext

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 67c85fa..99e9f4a 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 @@ class TaskHandler(object):
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):