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
|
from functools import lru_cache
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
|
from ..utils import output, BColors
|
||||||
from ..utils.config import main_settings
|
from ..utils.config import main_settings
|
||||||
from ..utils.string_processing import fit_to_file_system
|
from ..utils.string_processing import fit_to_file_system
|
||||||
|
|
||||||
@ -204,9 +205,12 @@ class Cache:
|
|||||||
for path in self._dir.iterdir():
|
for path in self._dir.iterdir():
|
||||||
if path.is_dir():
|
if path.is_dir():
|
||||||
for file in path.iterdir():
|
for file in path.iterdir():
|
||||||
|
output(f"Deleting file {file}", color=BColors.GREY)
|
||||||
file.unlink()
|
file.unlink()
|
||||||
|
output(f"Deleting folder {path}", color=BColors.HEADER)
|
||||||
path.rmdir()
|
path.rmdir()
|
||||||
else:
|
else:
|
||||||
|
output(f"Deleting folder {path}", color=BColors.HEADER)
|
||||||
path.unlink()
|
path.unlink()
|
||||||
|
|
||||||
self.cached_attributes.clear()
|
self.cached_attributes.clear()
|
||||||
|
Loading…
Reference in New Issue
Block a user