Skip to content

Commit

Permalink
fix blv_decode error (#73)
Browse files Browse the repository at this point in the history
  • Loading branch information
L-codes committed Feb 17, 2023
1 parent ee85ee5 commit 7361705
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions neoreg.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,13 @@ def blv_decode(data):
v = v.decode()
else:
try:
v = v.decode()
except UnicodeDecodeError:
v = v.decode('gbk')
try:
v = v.decode()
except UnicodeDecodeError:
try:
v = v.decode('gbk')
except:
pass
except Exception as ex:
log.error("[BLV Decode] [%s] => %s" % (name, repr(v)))
raise ex
Expand Down

0 comments on commit 7361705

Please sign in to comment.