mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-02-03 13:14:31 +03:00
Preserve backward compatibility with old .sign_in() code
This commit is contained in:
parent
5f636fdf31
commit
bea1b7f526
|
@ -267,10 +267,10 @@ class TelegramClient(TelegramBareClient):
|
|||
If the login succeeds, the logged in user is returned.
|
||||
"""
|
||||
|
||||
if phone:
|
||||
if phone and not code:
|
||||
return self.send_code_request(phone)
|
||||
elif code:
|
||||
if self._phone == None:
|
||||
if self._phone is None:
|
||||
raise ValueError(
|
||||
'Please make sure to call send_code_request first.')
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user