From ec82b4f994aa955e209efb69f19efc4c197e5e52 Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Mon, 2 Jul 2018 17:21:42 +0200 Subject: [PATCH] Don't use getpass anymore (for now) The reason is that getpass is blocking. Let's use ainput() until a proper way of reading from stdin without echoing is found. --- pyrogram/client/client.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pyrogram/client/client.py b/pyrogram/client/client.py index e56a0233..6ab9b17a 100644 --- a/pyrogram/client/client.py +++ b/pyrogram/client/client.py @@ -19,7 +19,6 @@ import asyncio import base64 import binascii -import getpass import inspect import json import logging @@ -548,7 +547,7 @@ class Client(Methods, BaseClient): if self.password is None: print("Hint: {}".format(r.hint)) - self.password = getpass.getpass("Enter password: ") + self.password = await ainput("Enter password: ") if type(self.password) is str: self.password = r.current_salt + self.password.encode() + r.current_salt