From 3bf70692b4e4538edef7d87ace4e885bba232c72 Mon Sep 17 00:00:00 2001 From: Lonami Exo Date: Fri, 6 Oct 2017 21:43:04 +0200 Subject: [PATCH] Fix TelegramClient.get_input_entity always failing/missing return --- telethon/telegram_client.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/telethon/telegram_client.py b/telethon/telegram_client.py index 11037257..1575be5d 100644 --- a/telethon/telegram_client.py +++ b/telethon/telegram_client.py @@ -930,7 +930,7 @@ class TelegramClient(TelegramBareClient): """ try: # First try to get the entity from cache, otherwise figure it out - self.session.entities.get_input_entity(peer) + return self.session.entities.get_input_entity(peer) except KeyError: pass @@ -960,7 +960,7 @@ class TelegramClient(TelegramBareClient): self.get_dialogs(limit=None) try: - self.session.entities.get_input_entity(peer) + return self.session.entities.get_input_entity(peer) except KeyError: pass