From 353abdc81ce8a28ccf4b8fe26cf5eda608ecfc1f Mon Sep 17 00:00:00 2001 From: Matthew Newhook Date: Fri, 9 Jan 2009 06:43:54 -0800 Subject: - Bug 3135 fix. - Print output immediately in the expect script if there is no supression strings. Squashed commit of the following: commit 28c05ad2e801dbb4dd00aae9eade326fda14c860 Author: U-WIN-5WBK5GD0FYQ\matthew Date: Fri Jan 9 06:38:58 2009 -0800 bug 3135 DEADLOCK DETECTED in test/IceUtil/condvar. --- scripts/Expect.py | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) (limited to 'scripts/Expect.py') diff --git a/scripts/Expect.py b/scripts/Expect.py index eec13384150..05a1558234e 100755 --- a/scripts/Expect.py +++ b/scripts/Expect.py @@ -101,18 +101,20 @@ class reader(threading.Thread): def trace(self, c): if self._trace: - self._tbuf.write(c) - if c == '\n': - content = self._tbuf.getvalue() - supress = False - if self._tracesupress: - for p in self._tracesupress: - if p.search(content): - supress = True - break - if not supress: - sys.stdout.write(content) - self._tbuf.truncate(0) + if self._tracesupress: + self._tbuf.write(c) + if c == '\n': + content = self._tbuf.getvalue() + supress = False + for p in self._tracesupress: + if p.search(content): + supress = True + break + if not supress: + sys.stdout.write(content) + self._tbuf.truncate(0) + else: + sys.stdout.write(c) def enabletrace(self, supress = None): self.cv.acquire() -- cgit v1.2.3