From 226bbd5bf7b8a2f29c04dd22b3bc129742fde4b9 Mon Sep 17 00:00:00 2001 From: bakatrouble Date: Fri, 15 Mar 2019 17:43:52 +0300 Subject: [PATCH] =?UTF-8?q?=D0=B0=D1=88=D1=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/main.py b/main.py index 09c6ca1..0f8c275 100755 --- a/main.py +++ b/main.py @@ -184,14 +184,11 @@ def _process_message(bot: Bot, m: Message): if r: user.update_from_message(r) except Unauthorized: - try: - name = conn.root.subscribers[uid].name - del conn.root.subscribers[uid] - commit() - bot.send_message(MANAGEMENT_CHAT, f'{name} был удален ' - f'из-за блокировки бота', parse_mode='html') - except Exception: - sentry_sdk.capture_exception() + name = conn.root.subscribers[uid].name + del conn.root.subscribers[uid] + commit() + bot.send_message(MANAGEMENT_CHAT, f'{name} был удален ' + f'из-за блокировки бота', parse_mode='html') except TelegramError: sentry_sdk.capture_exception()