diff --git a/src/main/python/protocol/keyboard_comm.py b/src/main/python/protocol/keyboard_comm.py index 4351faac8f..d15369a31d 100644 --- a/src/main/python/protocol/keyboard_comm.py +++ b/src/main/python/protocol/keyboard_comm.py @@ -139,7 +139,12 @@ def reload_layout(self, sideload_json=None): block += 1 sz -= MSG_LEN - payload = json.loads(lzma.decompress(payload)) + try: + payload = lzma.decompress(payload) + except lzma.LZMAError: + payload = payload.decode() + + payload = json.loads(payload) self.check_protocol_version()