diff options
author | dluyer <53582923+dluyer@users.noreply.github.com> | 2019-08-02 13:17:14 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-02 13:17:14 -0700 |
commit | 07a46a8c78caf4d6b6bd43134dfffcbf48663bb5 (patch) | |
tree | 13ada4cd48ce1300192f76ea9207b99e0d5427ca /pexpect | |
parent | ad3a8e90f1446283e7c0edef7065b9808963ee1b (diff) | |
download | pexpect-07a46a8c78caf4d6b6bd43134dfffcbf48663bb5.tar.gz |
Update expect.py
Diffstat (limited to 'pexpect')
-rw-r--r-- | pexpect/expect.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pexpect/expect.py b/pexpect/expect.py index c437aa0..28a224d 100644 --- a/pexpect/expect.py +++ b/pexpect/expect.py @@ -57,13 +57,13 @@ class Expecter(object): spawn._buffer.write(data) window = spawn.buffer else: - if len(data) >= self.searchwindowsize or not self._buffer.tell(): + if len(data) >= self.searchwindowsize or not spawn._buffer.tell(): window = data[-self.searchwindowsize:] spawn._buffer = spawn.buffer_type() spawn._buffer.write(window[-self.searchwindowsize:]) else: spawn._buffer.write(data) - new_len = self._buffer.tell() + new_len = spawn._buffer.tell() spawn._buffer.seek(max(0, new_len - self.searchwindowsize)) window = spawn._buffer.read() if freshlen > len(window): |