From c1c6df9fd0bfc9a20c7eb6864c697d9f38ce81b6 Mon Sep 17 00:00:00 2001 From: Lonami Exo Date: Sat, 30 Sep 2017 16:18:16 +0200 Subject: [PATCH] Fix invoke not raising ValueError when retries reach 0 --- telethon/telegram_bare_client.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/telethon/telegram_bare_client.py b/telethon/telegram_bare_client.py index cf26c465..d027a358 100644 --- a/telethon/telegram_bare_client.py +++ b/telethon/telegram_bare_client.py @@ -410,8 +410,7 @@ class TelegramBareClient: if result: return result - if retries <= 0: - raise ValueError('Number of retries reached 0.') + raise ValueError('Number of retries reached 0.') finally: if sender != self._sender: sender.disconnect() # Close temporary connections