aiorepl: Handle stream shutdown.

Signed-off-by: Andrew Leech <andrew.leech@planetinnovation.com.au>
pull/1039/head v1.26.0
Andrew Leech 2025-06-17 15:04:39 +10:00 zatwierdzone przez Damien George
rodzic b95ca2491a
commit 34c4ee1647
2 zmienionych plików z 3 dodań i 1 usunięć

Wyświetl plik

@ -114,6 +114,8 @@ async def task(g=None, prompt="--> "):
curs = 0 # cursor offset from end of cmd buffer
while True:
b = await s.read(1)
if not b: # Handle EOF/empty read
break
pc = c # save previous character
c = ord(b)
pt = t # save previous time

Wyświetl plik

@ -1,5 +1,5 @@
metadata(
version="0.2.1",
version="0.2.2",
description="Provides an asynchronous REPL that can run concurrently with an asyncio, also allowing await expressions.",
)