From 12c12fdfaff619111d5839604d50c08425c49a58 Mon Sep 17 00:00:00 2001 From: Lonami Exo Date: Sun, 17 Sep 2017 16:35:35 +0200 Subject: [PATCH] Fix representing .stringify() for bytes with indent > 0 --- telethon/tl/tlobject.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/telethon/tl/tlobject.py b/telethon/tl/tlobject.py index db18b9d3..5f587b37 100644 --- a/telethon/tl/tlobject.py +++ b/telethon/tl/tlobject.py @@ -61,10 +61,8 @@ class TLObject: result.append('\t' * indent) result.append('}') - elif isinstance(obj, str): - result.append('"') - result.append(obj) - result.append('"') + elif isinstance(obj, str) or isinstance(obj, bytes): + result.append(repr(obj)) elif hasattr(obj, '__iter__'): result.append('[\n')