feat: improved output of clearing the cache
This commit is contained in:
parent
c131924577
commit
c8cbfc7cb9
@ -6,6 +6,7 @@ from typing import List, Optional
|
||||
from functools import lru_cache
|
||||
import logging
|
||||
|
||||
from ..utils import output, BColors
|
||||
from ..utils.config import main_settings
|
||||
from ..utils.string_processing import fit_to_file_system
|
||||
|
||||
@ -204,9 +205,12 @@ class Cache:
|
||||
for path in self._dir.iterdir():
|
||||
if path.is_dir():
|
||||
for file in path.iterdir():
|
||||
output(f"Deleting file {file}", color=BColors.GREY)
|
||||
file.unlink()
|
||||
output(f"Deleting folder {path}", color=BColors.HEADER)
|
||||
path.rmdir()
|
||||
else:
|
||||
output(f"Deleting folder {path}", color=BColors.HEADER)
|
||||
path.unlink()
|
||||
|
||||
self.cached_attributes.clear()
|
||||
|
Loading…
Reference in New Issue
Block a user