#3060 - Correct change in game.py that caused test failures

This commit is contained in:
Charlie Crane
2025-02-11 16:20:11 +00:00
parent dadf93bc7f
commit 70fc11f4f1

View File

@@ -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