summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Kluyver <takowl@gmail.com>2015-04-25 17:29:45 -0700
committerThomas Kluyver <takowl@gmail.com>2015-04-25 17:29:45 -0700
commit82d4937b73a2fc49824e1f60fa0e036731a03135 (patch)
tree45c0c3982251bce9ffd0eba363ce9ff875b48fe8
parentd368bbb115ae0648bd1cf4fec4d795cf56e5da00 (diff)
parentbbdf34ce7ca6d3ec53e7157c7b1fb64d3d456cc5 (diff)
downloadpexpect-git-82d4937b73a2fc49824e1f60fa0e036731a03135.tar.gz
Merge pull request #202 from detly/eof-fix
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 99a0b28..5e5e9ee 100644
--- a/pexpect/async.py
+++ b/pexpect/async.py
@@ -57,6 +57,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)
@@ -68,4 +69,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)