From 32485e75032f5d47aee4f06bd55fe56d10c120ab Mon Sep 17 00:00:00 2001 From: Zack Cerza Date: Fri, 8 Aug 2014 13:18:44 -0600 Subject: [PATCH] Also rmtree on RuntimeError Signed-off-by: Zack Cerza --- teuthology/repo_utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/teuthology/repo_utils.py b/teuthology/repo_utils.py index 7a249c03c6..5ec59923e6 100644 --- a/teuthology/repo_utils.py +++ b/teuthology/repo_utils.py @@ -37,8 +37,8 @@ def enforce_repo_state(repo_url, dest_path, branch, remove_on_error=True): log.info("%s was just updated; assuming it is current", branch) reset_repo(repo_url, dest_path, branch) - #remove_pyc_files(dest_path) - except BranchNotFoundError: + # remove_pyc_files(dest_path) + except (BranchNotFoundError, RuntimeError): if remove_on_error: shutil.rmtree(dest_path, ignore_errors=True) raise -- 2.39.5