summaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2007-02-03 05:50:58 +0000
committerNarayan Desai <desai@mcs.anl.gov>2007-02-03 05:50:58 +0000
commit984698527dd76d52bebcf18fb4695f214367928c (patch)
treeeaa136486410884be66be21596d787fe6a53a5d7 /src/lib
parent9b6eecebfdf5df75d636a1ebc7f56740a8ac16df (diff)
downloadbcfg2-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/lib')
-rw-r--r--src/lib/Client/Tools/__init__.py14
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: