diff --git a/src/primaite/game/game.py b/src/primaite/game/game.py index 62b7f231..d4e5d100 100644 --- a/src/primaite/game/game.py +++ b/src/primaite/game/game.py @@ -298,9 +298,8 @@ class PrimaiteGame: new_service = new_node.software_manager.software[service_type] # fixing duration for the service - fix_duration = service_cfg.get("options", {}).get("fix_duration", None) - if fix_duration: - new_service.fixing_duration = fix_duration + if "fix_duration" in service_cfg.get("options", {}): + new_service.fixing_duration = service_cfg["options"]["fix_duration"] # start the service new_service.start() @@ -343,9 +342,8 @@ class PrimaiteGame: new_application = new_node.software_manager.software[application_type] # fixing duration for the application - fix_duration = application_cfg.get("options", {}).get("fix_duration", None) - if fix_duration: - new_application.fixing_duration = fix_duration + if "fix_duration" in application_cfg.get("options", {}): + new_application.fixing_duration = application_cfg["options"]["fix_duration"] else: msg = f"Configuration contains an invalid application type: {application_type}" _LOGGER.error(msg)