From d3afebe19c8a40fe694c7f9c31e9e88f3dcd8ab5 Mon Sep 17 00:00:00 2001 From: Zack Cerza Date: Fri, 3 Jan 2014 11:55:13 -0600 Subject: [PATCH] Be safer when calling ./bootstrap Signed-off-by: Zack Cerza --- teuthology/queue.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/teuthology/queue.py b/teuthology/queue.py index eb45f99006..9549af80e3 100644 --- a/teuthology/queue.py +++ b/teuthology/queue.py @@ -109,9 +109,14 @@ def fetch_teuthology_branch(path, branch='master'): # check for the NO_CLOBBER variable. env = os.environ.copy() env['NO_CLOBBER'] = '1' - log.info( - subprocess.check_output(('./bootstrap'), cwd=path, env=env) - ) + cmd = './bootstrap' + boot_proc = subprocess.Popen(cmd, shell=True, cwd=path, env=env, + stdout=subprocess.PIPE, + stderr=subprocess.STDOUT) + while boot_proc.poll() is None: + for line in boot_proc.stdout.readlines(): + log.info(line) + log.info("Bootstrap exited with status %s", boot_proc.returncode) finally: lock.release() -- 2.39.5