always use unicode function from compat module when encoding log messages
This commit is contained in:
parent
373ebf933f
commit
1a6f588d94
1 changed files with 0 additions and 3 deletions
|
@ -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 a new issue