From 984698527dd76d52bebcf18fb4695f214367928c Mon Sep 17 00:00:00 2001 From: Narayan Desai Date: Sat, 3 Feb 2007 05:50:58 +0000 Subject: Fix executor git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@2778 ce84e21b-d406-0410-9b95-82705330c041 --- src/lib/Client/Tools/__init__.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/lib/Client/Tools/__init__.py b/src/lib/Client/Tools/__init__.py index 90d3cedbc..cd6c096aa 100644 --- a/src/lib/Client/Tools/__init__.py +++ b/src/lib/Client/Tools/__init__.py @@ -44,12 +44,14 @@ class executor: except IOError: pass line = runpipe.fromchild.readline() - while line: - if len(line) > 0: - self.logger.debug('< %s' % line[:-1]) - output.append(line[:-1]) - line = runpipe.fromchild.readline() - cmdstat = runpipe.poll() + cmdstat = -1 + while cmdstat == -1: + while line: + if len(line) > 0: + self.logger.debug('< %s' % line[:-1]) + output.append(line[:-1]) + line = runpipe.fromchild.readline() + cmdstat = runpipe.poll() return (cmdstat, output) class Tool: -- cgit v1.2.3-1-g7c22