Remove unnecessary check for password_required

This commit is contained in:
Tanuj 2017-09-18 19:08:13 +01:00
parent df31a03788
commit b52384fce8

View File

@ -49,7 +49,6 @@ class NeedsMore(TelegramClient):
try: try:
code_ok = self.sign_in(user_phone, code) code_ok = self.sign_in(user_phone, code)
except SessionPasswordNeededError: except SessionPasswordNeededError:
if e.password_required:
pw = getpass('Two step verification enabled. Please enter your password: ') pw = getpass('Two step verification enabled. Please enter your password: ')
self.sign_in(password=pw) self.sign_in(password=pw)
print('INFO: Client initialized succesfully!') print('INFO: Client initialized succesfully!')