Fix .get_input_entity excepting wrong type

This commit is contained in:
Lonami Exo 2017-12-27 12:36:14 +01:00
parent b6b47d175c
commit 3512028d0f

View File

@ -1079,7 +1079,7 @@ class TelegramClient(TelegramBareClient):
try:
# First try to get the entity from cache, otherwise figure it out
return self.session.get_input_entity(peer)
except KeyError:
except ValueError:
pass
if isinstance(peer, str):