mirror of
https://github.com/wakatime/sublime-wakatime.git
synced 2023-08-10 21:13:02 +03:00
always use unicode function from compat module when encoding log messages
This commit is contained in:
parent
373ebf933f
commit
1a6f588d94
@ -24,9 +24,6 @@ except ImportError:
|
||||
class CustomEncoder(json.JSONEncoder):
|
||||
|
||||
def default(self, obj):
|
||||
if isinstance(obj, bytes):
|
||||
obj = bytes.decode(obj)
|
||||
return json.dumps(obj)
|
||||
try:
|
||||
encoded = super(CustomEncoder, self).default(obj)
|
||||
except UnicodeDecodeError:
|
||||
|
Loading…
Reference in New Issue
Block a user