feat: remove all unnecessary CONTEXT references

feat: replace CONTEXT with local context
This commit is contained in:
莘权 马 2024-01-17 18:11:42 +08:00
parent dddf50112a
commit d5ac56f863
66 changed files with 350 additions and 349 deletions

View file

@ -201,7 +201,10 @@ class GitRepository:
new_path = self.workdir.parent / new_dir_name
if new_path.exists():
logger.info(f"Delete directory {str(new_path)}")
shutil.rmtree(new_path)
try:
shutil.rmtree(new_path)
except Exception as e:
logger.warning(f"rm {str(new_path)} error: {e}")
if new_path.exists(): # Recheck for windows os
logger.warning(f"Failed to delete directory {str(new_path)}")
return