From b52384fce8e79e2a67da6e831b5d5046442af688 Mon Sep 17 00:00:00 2001 From: Tanuj Date: Mon, 18 Sep 2017 19:08:13 +0100 Subject: [PATCH] Remove unnecessary check for password_required --- telethon_examples/auto_reply.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/telethon_examples/auto_reply.py b/telethon_examples/auto_reply.py index 20df1c76..67b5d841 100755 --- a/telethon_examples/auto_reply.py +++ b/telethon_examples/auto_reply.py @@ -49,9 +49,8 @@ class NeedsMore(TelegramClient): try: code_ok = self.sign_in(user_phone, code) except SessionPasswordNeededError: - if e.password_required: - pw = getpass('Two step verification enabled. Please enter your password: ') - self.sign_in(password=pw) + pw = getpass('Two step verification enabled. Please enter your password: ') + self.sign_in(password=pw) print('INFO: Client initialized succesfully!') def run(self):