From c30e528bfb624312a6e9ab1c7631bcc4940c9f06 Mon Sep 17 00:00:00 2001 From: Ilya Zhuravlev Date: Tue, 8 Jun 2021 18:42:51 -0400 Subject: [PATCH] kle_serial: don't error when first item of keymap is a dict typically used with the {"name": ...} entry --- src/main/python/kle_serial.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/python/kle_serial.py b/src/main/python/kle_serial.py index ca9cad7..89131f5 100644 --- a/src/main/python/kle_serial.py +++ b/src/main/python/kle_serial.py @@ -98,6 +98,7 @@ class Serial: cluster = Cluster() kbd = Keyboard() align = 4 + item = None for r in range(len(rows)): if isinstance(rows[r], list): @@ -200,7 +201,9 @@ class Serial: self.deserializeError("keyboard metadata must the be first element", rows[r]) # TODO: parse prop else: - self.deserializeError("unexpected", rows[r]) + pass + # self.deserializeError("unexpected", rows[r]) + # TODO: first item could be {"name": "something"} - should handle it return kbd