From e7600622180e44f1e2a4e8ed472fa58a72b66849 Mon Sep 17 00:00:00 2001 From: udf Date: Wed, 21 Nov 2018 22:13:42 +0200 Subject: [PATCH] Minor code cleanup --- stdplugins/info.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stdplugins/info.py b/stdplugins/info.py index 4cd2621..260c007 100644 --- a/stdplugins/info.py +++ b/stdplugins/info.py @@ -10,7 +10,7 @@ from telethon.tl.types import MessageEntityPre from telethon.tl.tlobject import TLObject import datetime -PRINTABLE_SET = set(bytes(string.printable, 'ascii')) +PRINTABLE_SET = set(string.printable.encode()) STR_LEN_MAX = 256 BYTE_LEN_MAX = 64 @@ -19,7 +19,7 @@ def parse_pre(text): text = text.strip() return ( text, - [MessageEntityPre(offset=0, length=len(add_surrogate(text)), language='potato')] + [MessageEntityPre(offset=0, length=len(add_surrogate(text)), language='')] )