summaryrefslogtreecommitdiff
path: root/scripts/Expect.py
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2015-08-17 20:11:21 +0200
committerJose <jose@zeroc.com>2015-08-17 20:11:21 +0200
commit87b491f136d5ed120d5ba4816067f94f1b9d0419 (patch)
tree442a058d57b5fe6956269a2521dd4603b3bea67f /scripts/Expect.py
parentFix for Ice/properties when running with python 2.7 (diff)
downloadice-87b491f136d5ed120d5ba4816067f94f1b9d0419.tar.bz2
ice-87b491f136d5ed120d5ba4816067f94f1b9d0419.tar.xz
ice-87b491f136d5ed120d5ba4816067f94f1b9d0419.zip
Minor fix for Expect.py script
Diffstat (limited to 'scripts/Expect.py')
-rwxr-xr-xscripts/Expect.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/Expect.py b/scripts/Expect.py
index 404209bd1de..750b2c02ae1 100755
--- a/scripts/Expect.py
+++ b/scripts/Expect.py
@@ -98,7 +98,7 @@ class reader(threading.Thread):
self._tracesuppress = None
self.logfile = logfile
self.watchDog = None
- self._exited = False
+ self._finish = False
threading.Thread.__init__(self)
def setWatchDog(self, watchDog):
@@ -110,7 +110,7 @@ class reader(threading.Thread):
c = self.p.stdout.read(1)
if not c:
self.cv.acquire()
- self._exited = True
+ self._finish = True # We have finished processing output
self.cv.notify()
self.cv.release()
break
@@ -260,8 +260,8 @@ class reader(threading.Thread):
if len(pattern) != olen:
continue
- # If no match and the process has exited rasise a TIMEOUT
- if self._exited and isinstance(self.p, subprocess.Popen) and self.p.poll() is not None:
+ # If no match and we have finished processing output rasise a TIMEOUT
+ if self._finish:
raise TIMEOUT ('timeout exceeded in match\npattern: "%s"\nbuffer: "%s"\n' %
(escape(s), escape(buf, False)))