From 6443a4ae7d04b483619214a29e1c6146c1e9ca57 Mon Sep 17 00:00:00 2001 From: SmartManoj Date: Sun, 21 Jul 2019 12:57:18 +0530 Subject: [PATCH] Update auth.py --- telethon/client/auth.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/telethon/client/auth.py b/telethon/client/auth.py index 4c54a73a..e7702eac 100644 --- a/telethon/client/auth.py +++ b/telethon/client/auth.py @@ -317,7 +317,7 @@ class AuthMethods: if phone and not code and not password: return await self.send_code_request(phone) - elif code : + elif code: phone, phone_code_hash = \ self._parse_phone_and_hash(phone, phone_code_hash) @@ -327,7 +327,7 @@ class AuthMethods: result = await self(functions.auth.SignInRequest( phone, phone_code_hash, str(code))) except errors.RPCError: - return self.sign_in(password=password) + return await self.sign_in(password=password) elif password: pwd = await self(functions.account.GetPasswordRequest()) result = await self(functions.auth.CheckPasswordRequest(