Skip to content

Commit

Permalink
Fix #457: handle decode error for error/notice message (#460)
Browse files Browse the repository at this point in the history
  • Loading branch information
sitingren authored Jul 8, 2022
1 parent 16ce5b0 commit 9ff54ae
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def _unpack_data(data):
unpacked = unpack_from('c{0}sx'.format(null_byte - 1 - pos), data, pos)
key = unpacked[0]
value = unpacked[1]
data_mapping[key] = value.decode('utf-8')
data_mapping[key] = value.decode('utf-8', 'replace')

pos += (len(value) + 2)

Expand Down

0 comments on commit 9ff54ae

Please sign in to comment.