mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-06 05:00:23 +03:00
Check to make sure user does not pass nothing when prompted for code, as this would result in 'Signed in successfully as ' to be printed if the phone number input was a valid & registered account.
This commit is contained in:
parent
f4b9c9d6d4
commit
6618690a7c
|
@ -82,7 +82,10 @@ class AuthMethods(MessageParseMethods, UserMethods):
|
|||
"""
|
||||
if code_callback is None:
|
||||
def code_callback():
|
||||
return input('Please enter the code you received: ')
|
||||
code = input('Please enter the code you received: ')
|
||||
if code == '':
|
||||
code = 1
|
||||
return code
|
||||
elif not callable(code_callback):
|
||||
raise ValueError(
|
||||
'The code_callback parameter needs to be a callable '
|
||||
|
|
Loading…
Reference in New Issue
Block a user