mirror of
https://github.com/aclist/dztui.git
synced 2026-11-01 07:32:44 +01:00
fix: fetch ipdb if missing
This commit is contained in:
1 parent
3d53ee7ea0
commit
31d289048f
2 files changed
+5
-7
No files matched your search
@@ -27,11 +27,11 @@ def get_ipdb(ips_path: Path) -> None:
|
|||||||
|
|
||||||
date = find_date(url)
|
date = find_date(url)
|
||||||
month_file = ips_path.parent / ".month"
|
month_file = ips_path.parent / ".month"
|
||||||
if month_file.exists() is True:
|
if ips_path.exists() and month_file.exists():
|
||||||
old_date = month_file.read_text().rstrip("\n")
|
old_date = month_file.read_text().rstrip("\n")
|
||||||
if old_date == date:
|
if old_date == date:
|
||||||
logger.info(f"IP DB date matches: {date}")
|
logger.info(f"IP DB date matches: {date}")
|
||||||
return
|
return
|
||||||
|
|
||||||
# TODO: log additional output
|
# TODO: log additional output
|
||||||
logger.info(f"Fetching IPDB for {date} from {url}")
|
logger.info(f"Fetching IPDB for {date} from {url}")
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ from dzgui.init.migrate import (
|
|||||||
migrate_cols_file,
|
migrate_cols_file,
|
||||||
migrate_legacy_conf,
|
migrate_legacy_conf,
|
||||||
copy_state_files,
|
copy_state_files,
|
||||||
copy_ipdb,
|
|
||||||
)
|
)
|
||||||
from dzgui.init.prefix import get_version
|
from dzgui.init.prefix import get_version
|
||||||
from dzgui.init.prereqs import has_steam_client
|
from dzgui.init.prereqs import has_steam_client
|
||||||
@@ -73,7 +72,6 @@ def main() -> None:
|
|||||||
migrate_legacy_conf(XDG.config)
|
migrate_legacy_conf(XDG.config)
|
||||||
migrate_cols_file(XDG.columns)
|
migrate_cols_file(XDG.columns)
|
||||||
copy_state_files(xdg_paths["XDG_STATE_HOME"])
|
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"
|
_format = "%(asctime)s␞%(levelname)s␞%(filename)s::%(funcName)s::%(lineno)s␞%(message)s"
|
||||||
logging.basicConfig(filename=XDG.debug, format=_format, level=logging.DEBUG)
|
logging.basicConfig(filename=XDG.debug, format=_format, level=logging.DEBUG)
|
||||||
|
|||||||
Reference in new issue
Block a user