Skip to content

Commit 50f6174

Browse files
mpos_sdl_keyboard.py: catch exception in micropython.schedule
1 parent 38225a8 commit 50f6174

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

internal_filesystem/lib/mpos/indev/mpos_sdl_keyboard.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,10 @@ def _keypad_cb(self, *args):
370370
else:
371371
self.__current_state = self.RELEASED
372372

373-
micropython.schedule(MposSDLKeyboard.read, self)
373+
try:
374+
micropython.schedule(MposSDLKeyboard.read, self)
375+
except Exception as e:
376+
print(f"mpos_sdl_keyboard.py failed to call micropython.schedule: {e}")
374377

375378
def _get_key(self):
376379
return self.__current_state, self.__last_key

0 commit comments

Comments
 (0)