diff options
author | Jose <jose@zeroc.com> | 2015-08-13 19:45:13 +0200 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2015-08-13 19:45:13 +0200 |
commit | 48c5a63e355c6481b1b3c473cadbefdc85233b70 (patch) | |
tree | bb2c74a4a93b5efe2165ee043d64223ec5e634ab | |
parent | Fixed ICE-6707 - default interface for discovery is now Ice.Default.Host if i... (diff) | |
download | ice-48c5a63e355c6481b1b3c473cadbefdc85233b70.tar.bz2 ice-48c5a63e355c6481b1b3c473cadbefdc85233b70.tar.xz ice-48c5a63e355c6481b1b3c473cadbefdc85233b70.zip |
Another minor fix for Expect.py script
-rwxr-xr-x | scripts/Expect.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/Expect.py b/scripts/Expect.py index 2bd23444e87..404209bd1de 100755 --- a/scripts/Expect.py +++ b/scripts/Expect.py @@ -98,6 +98,7 @@ class reader(threading.Thread): self._tracesuppress = None self.logfile = logfile self.watchDog = None + self._exited = False threading.Thread.__init__(self) def setWatchDog(self, watchDog): @@ -109,6 +110,7 @@ class reader(threading.Thread): c = self.p.stdout.read(1) if not c: self.cv.acquire() + self._exited = True self.cv.notify() self.cv.release() break @@ -259,7 +261,7 @@ class reader(threading.Thread): continue # If no match and the process has exited rasise a TIMEOUT - if isinstance(self.p, subprocess.Popen) and self.p.poll() is not None: + if self._exited and isinstance(self.p, subprocess.Popen) and self.p.poll() is not None: raise TIMEOUT ('timeout exceeded in match\npattern: "%s"\nbuffer: "%s"\n' % (escape(s), escape(buf, False))) |