From 539121c4d175f03dba579fb77e37044d98cd5fd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vinot?= Date: Mon, 8 Jan 2024 18:58:59 +0100 Subject: [PATCH] fix: yes, it was dumb --- lookyloo/helpers.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lookyloo/helpers.py b/lookyloo/helpers.py index d0259063..b9a83eba 100644 --- a/lookyloo/helpers.py +++ b/lookyloo/helpers.py @@ -79,7 +79,8 @@ def get_email_template() -> str: def make_dirs_list(root_dir: Path) -> List[Path]: directories = [] year_now = date.today().year - while year_now >= year_now - 10: + oldest_year = year_now - 10 + while year_now >= oldest_year: year_dir = root_dir / str(year_now) if not year_dir.exists(): # if we do not have a directory with this year, continue.