Skip to content

Commit

Permalink
Add support for JSON without LZMA compression
Browse files Browse the repository at this point in the history
  • Loading branch information
sago35 committed Nov 5, 2023
1 parent f5ef91f commit 05a1984
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/main/python/protocol/keyboard_comm.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down

0 comments on commit 05a1984

Please sign in to comment.