improved logging

This commit is contained in:
Martin Diehl 2014-06-18 09:03:48 +00:00
parent fd1d44aa31
commit 1333921ed5
1 changed files with 3 additions and 1 deletions

View File

@ -231,10 +231,12 @@ class Test():
os.chdir(self.dirCurrent()) os.chdir(self.dirCurrent())
logging.info(cmd) logging.info(cmd)
line = True line = True
out = ''
process = subprocess.Popen(shlex.split(cmd),stdout=subprocess.PIPE,stderr = subprocess.STDOUT) process = subprocess.Popen(shlex.split(cmd),stdout=subprocess.PIPE,stderr = subprocess.STDOUT)
while line: while line:
line = process.stdout.readline() line = process.stdout.readline()
logging.debug(line) out += line
logging.debug(out)
os.chdir(initialPath) os.chdir(initialPath)