mirror of
https://gitea.tendokyu.moe/Hay1tsme/artemis.git
synced 2026-02-12 10:47:28 +08:00
pokken: add safety for loading config that doesn't exist
This commit is contained in:
@@ -19,6 +19,7 @@ class PokkenServlet(resource.Resource):
|
|||||||
self.core_cfg = core_cfg
|
self.core_cfg = core_cfg
|
||||||
self.config_dir = cfg_dir
|
self.config_dir = cfg_dir
|
||||||
self.game_cfg = PokkenConfig()
|
self.game_cfg = PokkenConfig()
|
||||||
|
if path.exists(f"{cfg_dir}/pokken.yaml"):
|
||||||
self.game_cfg.update(yaml.safe_load(open(f"{cfg_dir}/pokken.yaml")))
|
self.game_cfg.update(yaml.safe_load(open(f"{cfg_dir}/pokken.yaml")))
|
||||||
|
|
||||||
self.logger = logging.getLogger("pokken")
|
self.logger = logging.getLogger("pokken")
|
||||||
|
|||||||
Reference in New Issue
Block a user