diff options
author | Narayan Desai <desai@mcs.anl.gov> | 2007-02-03 05:50:58 +0000 |
---|---|---|
committer | Narayan Desai <desai@mcs.anl.gov> | 2007-02-03 05:50:58 +0000 |
commit | 984698527dd76d52bebcf18fb4695f214367928c (patch) | |
tree | eaa136486410884be66be21596d787fe6a53a5d7 /src | |
parent | 9b6eecebfdf5df75d636a1ebc7f56740a8ac16df (diff) | |
download | bcfg2-984698527dd76d52bebcf18fb4695f214367928c.tar.gz bcfg2-984698527dd76d52bebcf18fb4695f214367928c.tar.bz2 bcfg2-984698527dd76d52bebcf18fb4695f214367928c.zip |
Fix executor
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@2778 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/Client/Tools/__init__.py | 14 |
1 files 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: |