From f9001bc8e004fd5f6275d1be375eef30b6a00d30 Mon Sep 17 00:00:00 2001 From: Lonami Exo Date: Thu, 6 Apr 2023 12:21:49 +0200 Subject: [PATCH] Include Telethon version on fatal errors during updates Since a lot of people don't mention the version when reporting issues, it makes it hard to determine whether it's already been fixed or not. --- telethon/client/updates.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/telethon/client/updates.py b/telethon/client/updates.py index 8cc3a04b..448e6008 100644 --- a/telethon/client/updates.py +++ b/telethon/client/updates.py @@ -14,6 +14,7 @@ from ..events.common import EventBuilder, EventCommon from ..tl import types, functions from .._updates import GapError, PrematureEndReason from ..helpers import get_running_loop +from ..version import __version__ if typing.TYPE_CHECKING: @@ -419,7 +420,7 @@ class UpdateMethods: except asyncio.CancelledError: pass except Exception as e: - self._log[__name__].exception('Fatal error handling updates (this is a bug in Telethon, please report it)') + self._log[__name__].exception(f'Fatal error handling updates (this is a bug in Telethon v{__version__}, please report it)') self._updates_error = e await self.disconnect()