From 4e170a2042c114e46b978c83413e2267194d957b Mon Sep 17 00:00:00 2001 From: 18alantom <2.alan.tom@gmail.com> Date: Fri, 19 Jan 2024 19:28:57 +0530 Subject: [PATCH] fix: remove rem check from app-cache --clear --- bench/utils/bench.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/bench/utils/bench.py b/bench/utils/bench.py index 73462316..9f1daded 100644 --- a/bench/utils/bench.py +++ b/bench/utils/bench.py @@ -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: