This commit is contained in:
Daniel Langbein 2022-05-23 17:32:30 +02:00
parent 6f3afb6ac8
commit e40fc1158b

View File

@ -112,8 +112,9 @@ class Config:
return matches
def load_json(self) -> tuple[list[str], list]:
j = json.loads(self.get_cfg_path().read_text())
@classmethod
def load_json(cls) -> tuple[list[str], list]:
j = json.loads(cls.get_cfg_path().read_text())
if "screens" not in j:
raise Exception("'screens' array missing in cfg.")
screens = j["screens"]