You've already forked MicroPythonOS
mirror of
https://github.com/m5stack/MicroPythonOS.git
synced 2026-05-20 11:51:27 -07:00
18 lines
757 B
Plaintext
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):
|