]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
Also rmtree on RuntimeError
authorZack Cerza <zack.cerza@inktank.com>
Fri, 8 Aug 2014 19:18:44 +0000 (13:18 -0600)
committerZack Cerza <zack.cerza@inktank.com>
Fri, 8 Aug 2014 19:18:44 +0000 (13:18 -0600)
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
teuthology/repo_utils.py

index 7a249c03c6bd9bcb84204efe2246b452e822d165..5ec59923e693becbc35befea5dfd1b1690314912 100644 (file)
@@ -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