Content-Length: 253728 | pFad | http://github.com/micropython/micropython-lib/commit/4e04f7338ef91c4c63519bd5f06304547666f82b

ED aiorepl: Handle stream shutdown. · micropython/micropython-lib@4e04f73 · GitHub
Skip to content

Commit 4e04f73

Browse files
committed
aiorepl: Handle stream shutdown.
Signed-off-by: Andrew Leech <andrew.leech@planetinnovation.com.au>
1 parent 5b496e9 commit 4e04f73

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

micropython/aiorepl/aiorepl.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,8 @@ async def task(g=None, prompt="--> "):
114114
curs = 0 # cursor offset from end of cmd buffer
115115
while True:
116116
b = await s.read(1)
117+
if not b: # Handle EOF/empty read
118+
break
117119
pc = c # save previous character
118120
c = ord(b)
119121
pt = t # save previous time

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/micropython/micropython-lib/commit/4e04f7338ef91c4c63519bd5f06304547666f82b

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy