Skip to content

Commit

Permalink
fix: Revert back to regular input() in pause()
Browse files Browse the repository at this point in the history
  • Loading branch information
plammens committed Jan 10, 2023
1 parent a7d5746 commit 30839f2
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/loveletter_cli/ui/input.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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... ")

0 comments on commit 30839f2

Please sign in to comment.