fix: fetch ipdb if missing

This commit is contained in:
aclist committed 2026-01-09 10:58:41 +09:00
1 parent 3d53ee7ea0
commit 31d289048f
2 files changed
+5 -7

No files matched your search

+5 -5
View File
@@ -27,11 +27,11 @@ def get_ipdb(ips_path: Path) -> None:
date = find_date(url)
month_file = ips_path.parent / ".month"
if month_file.exists() is True:
old_date = month_file.read_text().rstrip("\n")
if old_date == date:
logger.info(f"IP DB date matches: {date}")
return
if ips_path.exists() and month_file.exists():
old_date = month_file.read_text().rstrip("\n")
if old_date == date:
logger.info(f"IP DB date matches: {date}")
return
# TODO: log additional output
logger.info(f"Fetching IPDB for {date} from {url}")