From 0b6d766f0c1cb5192913c5cdcbcc91f256228c26 Mon Sep 17 00:00:00 2001 From: bugchecker Date: Sun, 14 Apr 2019 08:38:26 +0000 Subject: [PATCH] Fix loading initial pts/date could be None (#1153) --- telethon/client/telegrambaseclient.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/telethon/client/telegrambaseclient.py b/telethon/client/telegrambaseclient.py index 5e8004ae..ebc82b6c 100644 --- a/telethon/client/telegrambaseclient.py +++ b/telethon/client/telegrambaseclient.py @@ -311,7 +311,7 @@ class TelegramBaseClient(abc.ABC): # is lightweight and immutable we can easily copy them around to # each update in case they need to fetch missing entities. state = self.session.get_update_state(0) - self._old_pts_date = state.pts, state.date + self._old_pts_date = (state.pts, state.date) if state else (None, None) self._new_pts_date = (None, None) # Some further state for subclasses