From 6df38da793d14e48865d3180c983244e0a2aa2f4 Mon Sep 17 00:00:00 2001 From: Lonami Exo Date: Fri, 29 Sep 2017 19:54:40 +0200 Subject: [PATCH] Fix session failing to load if no auth_key present --- telethon/tl/session.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/telethon/tl/session.py b/telethon/tl/session.py index e72c2a21..b8d89598 100644 --- a/telethon/tl/session.py +++ b/telethon/tl/session.py @@ -118,7 +118,7 @@ class Session: # FIXME We need to import the AuthKey here or otherwise # we get cyclic dependencies. from ..crypto import AuthKey - if data['auth_key_data'] is not None: + if data.get('auth_key_data', None) is not None: key = b64decode(data['auth_key_data']) result.auth_key = AuthKey(data=key)