From 4ac88a150570179ad65d13f4ff98f1e076b8b538 Mon Sep 17 00:00:00 2001 From: Lonami Exo Date: Mon, 13 Nov 2017 10:58:10 +0100 Subject: [PATCH] Use ._logger.exception when .connect fails (#373) --- telethon/telegram_bare_client.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/telethon/telegram_bare_client.py b/telethon/telegram_bare_client.py index 48c58c1d..67ba0c88 100644 --- a/telethon/telegram_bare_client.py +++ b/telethon/telegram_bare_client.py @@ -204,12 +204,10 @@ class TelegramBareClient: self.disconnect() return self.connect(_sync_updates=_sync_updates) - except (RPCError, ConnectionError) as error: + except (RPCError, ConnectionError): # Probably errors from the previous session, ignore them self.disconnect() - self._logger.debug( - 'Could not stabilise initial connection: {}'.format(error) - ) + self._logger.exception('Could not stabilise initial connection.') return False def is_connected(self):