From dc6301b710867ded45e9ad7b975de09c482ce658 Mon Sep 17 00:00:00 2001 From: koplo199 <85577251+koplo199@users.noreply.github.com> Date: Mon, 2 Oct 2023 16:38:46 +0200 Subject: [PATCH] Attempt to fix pytest --- bottles/backend/globals.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bottles/backend/globals.py b/bottles/backend/globals.py index 3a55149d8f3..9e5252b24d1 100644 --- a/bottles/backend/globals.py +++ b/bottles/backend/globals.py @@ -20,7 +20,7 @@ from functools import lru_cache from pathlib import Path from typing import Dict -from bottles.backend.utils import json +from bottles.backend.utils import yaml, json @lru_cache class Paths: @@ -79,7 +79,9 @@ class TrdyPaths: mangohud_available = shutil.which("mangohud") or False obs_vkc_available = shutil.which("obs-vkcapture") or False vmtouch_available = shutil.which("vmtouch") or False -base_version = json.load(open("/app/manifest.json")).get("base-version","").removeprefix("stable-") +base_version = "" +if os.path.exists("/app/manifest.json"): + base_version = json.load(open("/app/manifest.json")).get("base-version","").removeprefix("stable-") # encoding detection correction, following windows defaults locale_encodings: Dict[str, str] = {