Skip to content

Commit

Permalink
🐛 fix #155 download script
Browse files Browse the repository at this point in the history
  • Loading branch information
zhzLuke96 committed Sep 13, 2024
1 parent cc230ac commit 2c779d2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion scripts/dl_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,8 @@ def check_exist(self) -> bool:
return True

def gc(self):
os.system(f"rm -rf {self.cache_dir}")
try:
shutil.rmtree(self.cache_dir)
self.logger.info(f"Cache directory {self.cache_dir} deleted successfully.")
except Exception as e:
self.logger.error(f"Failed to delete cache directory {self.cache_dir}: {e}")

0 comments on commit 2c779d2

Please sign in to comment.