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.
This commit is contained in:
Dan 2018-07-02 17:21:42 +02:00
parent ed562edb9f
commit ec82b4f994

View file

@ -19,7 +19,6 @@
import asyncio import asyncio
import base64 import base64
import binascii import binascii
import getpass
import inspect import inspect
import json import json
import logging import logging
@ -548,7 +547,7 @@ class Client(Methods, BaseClient):
if self.password is None: if self.password is None:
print("Hint: {}".format(r.hint)) print("Hint: {}".format(r.hint))
self.password = getpass.getpass("Enter password: ") self.password = await ainput("Enter password: ")
if type(self.password) is str: if type(self.password) is str:
self.password = r.current_salt + self.password.encode() + r.current_salt self.password = r.current_salt + self.password.encode() + r.current_salt