From bbdf34ce7ca6d3ec53e7157c7b1fb64d3d456cc5 Mon Sep 17 00:00:00 2001 From: Jason Heeris Date: Tue, 7 Apr 2015 07:24:41 +1000 Subject: Set flag_eof in async protocol. Fixes #200. --- pexpect/async.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) -- cgit v1.2.1