summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Heeris <jason.heeris@gmail.com>2015-04-07 07:24:41 +1000
committerJason Heeris <jason.heeris@gmail.com>2015-04-07 07:24:41 +1000
commitbbdf34ce7ca6d3ec53e7157c7b1fb64d3d456cc5 (patch)
tree4bdf310c57122b3aaa8388b4bb55be026703083b
parent450f390eaecf88ad95f429ce8b5d03fc8381f158 (diff)
downloadpexpect-git-bbdf34ce7ca6d3ec53e7157c7b1fb64d3d456cc5.tar.gz
Set flag_eof in async protocol. Fixes #200.
-rw-r--r--pexpect/async.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/pexpect/async.py b/pexpect/async.py
index 50eae3b..fe527f3 100644
--- a/pexpect/async.py
+++ b/pexpect/async.py
@@ -56,6 +56,7 @@ class PatternWaiter(asyncio.Protocol):
# N.B. If this gets called, async will close the pipe (the spawn object)
# for us
try:
+ self.expecter.spawn.flag_eof = True
index = self.expecter.eof()
except EOF as e:
self.error(e)
@@ -67,4 +68,4 @@ class PatternWaiter(asyncio.Protocol):
# We may get here without eof_received being called, e.g on Linux
self.eof_received()
elif exc is not None:
- self.error(exc) \ No newline at end of file
+ self.error(exc)