From 30839f2f0907a710ff358d19ee094eb6868bdb50 Mon Sep 17 00:00:00 2001 From: Paolo Lammens Date: Tue, 10 Jan 2023 01:09:26 +0100 Subject: [PATCH] fix: Revert back to regular input() in pause() --- src/loveletter_cli/ui/input.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/loveletter_cli/ui/input.py b/src/loveletter_cli/ui/input.py index d50c1ca..e576810 100644 --- a/src/loveletter_cli/ui/input.py +++ b/src/loveletter_cli/ui/input.py @@ -27,7 +27,6 @@ async def ainput(*args, **kwargs): os.set_blocking(sys.stdin.fileno(), True) return result - @functools.wraps(aioconsole.ainput) async def aprint(*args, **kwargs): result = await aioconsole.aprint(*args, **kwargs) @@ -190,10 +189,4 @@ def _decorate_prompt(prompt: str) -> str: async def pause() -> None: - # Using ainput() instead of regular input() sometimes causes trouble: - # the user has to enter twice before input is detected; - # but the asynchronous nature is needed to ensure other events are handled in time - # (e.g. when the connection is lost). - # Also caused trouble on Linux and Unix regarding the O_NONBLOCK flag - # (see #17 and #19) but this has been fixed. - await ainput("Enter something to continue... ") + input("Enter something to continue... ")