From 2e544270cd83a9e6f2b41c34be12ea761906b62b Mon Sep 17 00:00:00 2001 From: nosanity Date: Thu, 14 Feb 2019 09:46:57 +0300 Subject: [PATCH] Fix login failure due to wrong argument name (#1109) --- telethon/client/auth.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/telethon/client/auth.py b/telethon/client/auth.py index add88f7a..57aabe0c 100644 --- a/telethon/client/auth.py +++ b/telethon/client/auth.py @@ -231,9 +231,9 @@ class AuthMethods(MessageParseMethods, UserMethods): 'Please make sure to call send_code_request first.' ) - phone_code_hash = phone_hash or self._phone_code_hash.get(phone, None) - if not phone_code_hash: - raise ValueError('You also need to provide a phone_code_hash.') + phone_hash = phone_hash or self._phone_code_hash.get(phone, None) + if not phone_hash: + raise ValueError('You also need to provide a phone_hash.') return phone, phone_hash