mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-10 19:46:36 +03:00
Fix session table may be empty if no DC switch
This commit is contained in:
parent
50d413b1c9
commit
4a139b0ae4
|
@ -97,10 +97,12 @@ class Session:
|
|||
|
||||
# These values will be saved
|
||||
c.execute('select * from sessions')
|
||||
self._dc_id, self._server_address, self._port, key, = c.fetchone()
|
||||
tuple_ = c.fetchone()
|
||||
if tuple_:
|
||||
self._dc_id, self._server_address, self._port, key, = tuple_
|
||||
from ..crypto import AuthKey
|
||||
self._auth_key = AuthKey(data=key)
|
||||
|
||||
from ..crypto import AuthKey
|
||||
self._auth_key = AuthKey(data=key)
|
||||
c.close()
|
||||
else:
|
||||
# Tables don't exist, create new ones
|
||||
|
|
Loading…
Reference in New Issue
Block a user