2
0
mirror of https://github.com/frappe/bench.git synced 2024-06-19 00:22:19 +00:00

fix: remove rem check from app-cache --clear

This commit is contained in:
18alantom 2024-01-19 19:28:57 +05:30
parent c5ec4f7528
commit 4e170a2042

View File

@ -748,11 +748,8 @@ def cache_clear() -> None:
tot_size = get_dir_size(cache_path)
shutil.rmtree(cache_path)
rem_items = tot_items - len(os.listdir(cache_path))
rem_size = tot_size - get_dir_size(cache_path)
if rem_items:
click.echo(f"Cleared {rem_size / 1_000_000:.3f} MB belonging to {rem_items} items")
if tot_items:
click.echo(f"Cleared {tot_size / 1_000_000:.3f} MB belonging to {tot_items} items")
def get_dir_size(p: Path) -> int: