1
0
Fork 0
mirror of https://github.com/YunoHost/apps.git synced 2024-09-03 20:06:07 +02:00

get_catalog can be passed a path to an apps repo

This commit is contained in:
Salamandar 2024-08-13 11:15:52 +02:00
parent 8444622255
commit 0f6864b508

View file

@ -36,7 +36,7 @@ def git_repo_age(path: Path) -> Union[bool, int]:
@cache
def get_catalog(working_only: bool = False) -> dict[str, dict[str, Any]]:
def get_catalog(apps_repo: Path | None = None, working_only: bool = False) -> dict[str, dict[str, Any]]:
"""Load the app catalog and filter out the non-working ones"""
catalog = toml.load((REPO_APPS_ROOT / "apps.toml").open("r", encoding="utf-8"))
if working_only: