From f4c583664a5a28fa7cc81f35301943197745473a Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Mon, 2 Jul 2018 19:14:30 +0200 Subject: [PATCH] Remove unsupported arguments for Python <3.7 --- pyrogram/client/ext/utils.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pyrogram/client/ext/utils.py b/pyrogram/client/ext/utils.py index 3a275942..5161d370 100644 --- a/pyrogram/client/ext/utils.py +++ b/pyrogram/client/ext/utils.py @@ -61,7 +61,9 @@ class Str(str): async def ainput(prompt: str = ""): - with ThreadPoolExecutor(1, "AsyncInput", lambda x: print(x, end="", flush=True), (prompt,)) as executor: + print(prompt, end="", flush=True) + + with ThreadPoolExecutor(1, "AsyncInput") as executor: return (await asyncio.get_event_loop().run_in_executor( executor, sys.stdin.readline )).rstrip()