mirror of
https://github.com/aclist/dztui.git
synced 2026-08-28 10:47:15 +02:00
fix: fetch ipdb if missing
This commit is contained in:
parent
3d53ee7ea0
commit
31d289048f
@ -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}")
|
||||
|
||||
@ -19,7 +19,6 @@ from dzgui.init.migrate import (
|
||||
migrate_cols_file,
|
||||
migrate_legacy_conf,
|
||||
copy_state_files,
|
||||
copy_ipdb,
|
||||
)
|
||||
from dzgui.init.prefix import get_version
|
||||
from dzgui.init.prereqs import has_steam_client
|
||||
@ -73,7 +72,6 @@ def main() -> None:
|
||||
migrate_legacy_conf(XDG.config)
|
||||
migrate_cols_file(XDG.columns)
|
||||
copy_state_files(xdg_paths["XDG_STATE_HOME"])
|
||||
copy_ipdb(XDG.ips)
|
||||
|
||||
_format = "%(asctime)s␞%(levelname)s␞%(filename)s::%(funcName)s::%(lineno)s␞%(message)s"
|
||||
logging.basicConfig(filename=XDG.debug, format=_format, level=logging.DEBUG)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user