From a662c1734fb7d8db633871df9452e456d9a814c4 Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Wed, 24 Jan 2018 18:35:17 +0100 Subject: [PATCH] Move GetPassword request outside the loop --- pyrogram/client/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyrogram/client/client.py b/pyrogram/client/client.py index 5920fbbd..bf8b1e51 100644 --- a/pyrogram/client/client.py +++ b/pyrogram/client/client.py @@ -290,10 +290,10 @@ class Client: self.phone_code = None except SessionPasswordNeeded as e: print(e.MESSAGE) + r = self.send(functions.account.GetPassword()) while True: try: - r = self.send(functions.account.GetPassword()) if self.password is None: print("Hint: {}".format(r.hint))