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)
) for k, v in obj.items()
))
elif isinstance(obj, str):
return '"{}"'.format(obj)
elif isinstance(obj, str) or isinstance(obj, bytes):
return repr(obj)
elif hasattr(obj, '__iter__'):
return '[{}]'.format(
', '.join(TLObject.pretty_format(x) for x in obj)