summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Lib/test/test_asyncio/echo.py2
-rw-r--r--Lib/test/test_asyncio/echo3.py2
2 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_asyncio/echo.py b/Lib/test/test_asyncio/echo.py
index f6ac0a3..006364b 100644
--- a/Lib/test/test_asyncio/echo.py
+++ b/Lib/test/test_asyncio/echo.py
@@ -3,4 +3,6 @@ import os
if __name__ == '__main__':
while True:
buf = os.read(0, 1024)
+ if not buf:
+ break
os.write(1, buf)
diff --git a/Lib/test/test_asyncio/echo3.py b/Lib/test/test_asyncio/echo3.py
index f1f7ea7..0644967 100644
--- a/Lib/test/test_asyncio/echo3.py
+++ b/Lib/test/test_asyncio/echo3.py
@@ -3,6 +3,8 @@ import os
if __name__ == '__main__':
while True:
buf = os.read(0, 1024)
+ if not buf:
+ break
try:
os.write(1, b'OUT:'+buf)
except OSError as ex: