If bootstrap fails, remove the virtualenv

Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
This commit is contained in:
Zack Cerza 2014-08-12 17:02:04 -06:00
parent a948baaf62
commit dd9ee971d7

View File

@ -208,6 +208,9 @@ def fetch_teuthology(branch, lock=True):
for line in boot_proc.stdout.readlines():
log.warn(line.strip())
log.info("Bootstrap exited with status %s", returncode)
venv_path = os.path.join(dest_path, 'virtualenv')
log.info("Removing %s", venv_path)
shutil.rmtree(venv_path, ignore_errors=True)
return dest_path