From 4d4d5e3b6dade6d9a430295fa48d1863f53957c5 Mon Sep 17 00:00:00 2001 From: neobooru <50623835+neobooru@users.noreply.github.com> Date: Mon, 30 Sep 2019 00:29:42 +0200 Subject: [PATCH] server/info: only ignore FileNotFoundError --- server/szurubooru/api/info_api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/szurubooru/api/info_api.py b/server/szurubooru/api/info_api.py index d5e2d7f4..b0721475 100644 --- a/server/szurubooru/api/info_api.py +++ b/server/szurubooru/api/info_api.py @@ -22,7 +22,7 @@ def _get_disk_usage() -> int: file_path = os.path.join(dir_path, file_name) try: total_size += os.path.getsize(file_path) - except: + except FileNotFoundError: pass _cache_time = now _cache_result = total_size