From 70fc11f4f110e138c16c4a80030b408b3ecb7f15 Mon Sep 17 00:00:00 2001 From: Charlie Crane Date: Tue, 11 Feb 2025 16:20:11 +0000 Subject: [PATCH] #3060 - Correct change in game.py that caused test failures --- src/primaite/game/game.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/primaite/game/game.py b/src/primaite/game/game.py index 639b37cf..4741199c 100644 --- a/src/primaite/game/game.py +++ b/src/primaite/game/game.py @@ -247,9 +247,11 @@ class PrimaiteGame: game.options = PrimaiteGameOptions(**cfg["game"]) game.save_step_metadata = cfg.get("io_settings", {}).get("save_step_metadata") or False + config_version = cfg.get("version", {}) + # TODO: Future YAML config should specify the PrimAITE version they are written for. # For now, we warn that if it is missing, pending a mechanism to handle variations. - if not cfg["version"]: + if not isinstance(config_version, int): _LOGGER.warning("Version definition is missing from provided configuration. ") # 1. create simulation