From 6b17d3125eab935d7f98e611e6d9ec03b0304a61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Tue, 13 Aug 2024 08:44:04 +0200 Subject: [PATCH] autopatch: do not rely on REPO_APPS_ROOT --- autopatches/autopatch.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/autopatches/autopatch.py b/autopatches/autopatch.py index a1ea77d..c462738 100755 --- a/autopatches/autopatch.py +++ b/autopatches/autopatch.py @@ -15,19 +15,20 @@ import toml sys.path.insert(0, str(Path(__file__).parent.parent)) from appslib.utils import ( # noqa: E402 pylint: disable=import-error,wrong-import-position - REPO_APPS_ROOT, get_catalog, ) +TOOLS_DIR = Path(__file__).resolve().parent.parent + my_env = os.environ.copy() my_env["GIT_TERMINAL_PROMPT"] = "0" os.makedirs(".apps_cache", exist_ok=True) login = ( - (REPO_APPS_ROOT / "tools/.github_login").open("r", encoding="utf-8").read().strip() + (TOOLS_DIR / ".github_login").open("r", encoding="utf-8").read().strip() ) token = ( - (REPO_APPS_ROOT / "tools/.github_token").open("r", encoding="utf-8").read().strip() + (TOOLS_DIR / ".github_token").open("r", encoding="utf-8").read().strip() ) github_api = "https://api.github.com"