diff options
Diffstat (limited to 'scripts/Expect.py')
-rwxr-xr-x | scripts/Expect.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/Expect.py b/scripts/Expect.py index 8701f6b8683..45edb751acc 100755 --- a/scripts/Expect.py +++ b/scripts/Expect.py @@ -197,6 +197,11 @@ class reader(threading.Thread): s, regexp = p if s == TIMEOUT: continue + if not buf: + # + # Don't try to match on an empty buffer, http://bugs.python.org/issue17998 + # + break m = regexp.search(buf) if m is not None: before = buf[:m.start()] |