From cbd6633b45c27483a66949617ea045389b7fa027 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Sun, 10 Feb 2019 14:48:00 +0100 Subject: [PATCH] i guess another check may be fine --- telegrambot.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/telegrambot.py b/telegrambot.py index 92eb6f42..d501e987 100644 --- a/telegrambot.py +++ b/telegrambot.py @@ -509,7 +509,10 @@ def on_callback_query(bot: telegram.Bot, update: telegram.Update): }) sentry.captureException() finally: - session.close() + try: + session.close() + except Exception: + pass @command