From b8fbbbb1cd31f0cd6f1c7724d97dba30c86a1fc5 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Fri, 10 Jul 2026 17:07:30 +0900 Subject: [PATCH] chore: abstract function to facilitate unit testing --- dzgui/api/steam.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dzgui/api/steam.py b/dzgui/api/steam.py index 10f1ea6..002dcce 100644 --- a/dzgui/api/steam.py +++ b/dzgui/api/steam.py @@ -344,13 +344,15 @@ def get_app_allows_downloads(path: Path, appid: int) -> bool: # NOTE: never allow case 2: return False - # NOTE: no other known values at this time + # NOTE: no other known values at this time, fallback (assume permits) case _: return True +def get_config(path: Path) -> bool: + return path.joinpath("config/config.vdf") def get_client_allows_downloads(path: Path) -> bool: - config = path.joinpath("config/config.vdf") + config = get_config(path) try: with open(config) as f: settings = vdf.load(f)