Skip to content

Commit

Permalink
Print raw UPK after parsing failure
Browse files Browse the repository at this point in the history
  • Loading branch information
kuba2k2 committed Dec 1, 2023
1 parent b2fac37 commit 665743e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion bk7231tools/analysis/kvstorage.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,10 @@ def read_value_parsed(self, index: DataBlock.IndexPage) -> Union[str, dict, list
pass
# Tuya's weird JSON
if index.name == "user_param_key":
return self.parse_user_param_key(value)
try:
return self.parse_user_param_key(value)
except JSONDecodeError:
raise RuntimeError(f"Couldn't parse UPK: {value}")
# something else?
return value

Expand Down

0 comments on commit 665743e

Please sign in to comment.