From a353679796891ef8e0443233bf44c145d1376611 Mon Sep 17 00:00:00 2001 From: Lonami Exo Date: Fri, 23 Feb 2018 13:13:39 +0100 Subject: [PATCH] Fix downloading from another DC using wrong auth the first time --- telethon/session.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/telethon/session.py b/telethon/session.py index 16232b14..4658df2b 100644 --- a/telethon/session.py +++ b/telethon/session.py @@ -227,7 +227,7 @@ class Session: c = self._cursor() c.execute('select auth_key from sessions') tuple_ = c.fetchone() - if tuple_: + if tuple_ and tuple_[0]: self._auth_key = AuthKey(data=tuple_[0]) else: self._auth_key = None