]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
Be safer when calling ./bootstrap
authorZack Cerza <zack@cerza.org>
Fri, 3 Jan 2014 17:55:13 +0000 (11:55 -0600)
committerZack Cerza <zack@cerza.org>
Fri, 3 Jan 2014 17:55:13 +0000 (11:55 -0600)
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
teuthology/queue.py

index eb45f99006a6fd35db63a2bc895f9a199bd3cd08..9549af80e3b1a98acd99db208fc8e682c25519e0 100644 (file)
@@ -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()