summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_asyncio/echo3.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@dropbox.com>2013-10-20 04:26:34 (GMT)
committerGuido van Rossum <guido@dropbox.com>2013-10-20 04:26:34 (GMT)
commitd49c47bfb0ea3bc2e7d8778d8002c0f628d97488 (patch)
tree184356b4a12fa3c25c7c213c37e03537eafa8189 /Lib/test/test_asyncio/echo3.py
parent0acceb769770fad191e8be4944ac4ecc0458d079 (diff)
downloadcpython-d49c47bfb0ea3bc2e7d8778d8002c0f628d97488.zip
cpython-d49c47bfb0ea3bc2e7d8778d8002c0f628d97488.tar.gz
cpython-d49c47bfb0ea3bc2e7d8778d8002c0f628d97488.tar.bz2
Break out of loop on EOF in asyncio echo test programs.
Diffstat (limited to 'Lib/test/test_asyncio/echo3.py')
-rw-r--r--Lib/test/test_asyncio/echo3.py2
1 files changed, 2 insertions, 0 deletions
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: