TLObject.stringify() was showing bytes as lists

This commit is contained in:
Lonami Exo 2017-08-24 20:56:08 +02:00
parent 2e55998d7f
commit 2517b9787d

View File

@ -47,8 +47,8 @@ class TLObject:
k, TLObject.pretty_format(v) k, TLObject.pretty_format(v)
) for k, v in obj.items() ) for k, v in obj.items()
)) ))
elif isinstance(obj, str): elif isinstance(obj, str) or isinstance(obj, bytes):
return '"{}"'.format(obj) return repr(obj)
elif hasattr(obj, '__iter__'): elif hasattr(obj, '__iter__'):
return '[{}]'.format( return '[{}]'.format(
', '.join(TLObject.pretty_format(x) for x in obj) ', '.join(TLObject.pretty_format(x) for x in obj)