#2725: apply PR suggestions
This commit is contained in:
@@ -298,9 +298,8 @@ class PrimaiteGame:
|
|||||||
new_service = new_node.software_manager.software[service_type]
|
new_service = new_node.software_manager.software[service_type]
|
||||||
|
|
||||||
# fixing duration for the service
|
# fixing duration for the service
|
||||||
fix_duration = service_cfg.get("options", {}).get("fix_duration", None)
|
if "fix_duration" in service_cfg.get("options", {}):
|
||||||
if fix_duration:
|
new_service.fixing_duration = service_cfg["options"]["fix_duration"]
|
||||||
new_service.fixing_duration = fix_duration
|
|
||||||
|
|
||||||
# start the service
|
# start the service
|
||||||
new_service.start()
|
new_service.start()
|
||||||
@@ -343,9 +342,8 @@ class PrimaiteGame:
|
|||||||
new_application = new_node.software_manager.software[application_type]
|
new_application = new_node.software_manager.software[application_type]
|
||||||
|
|
||||||
# fixing duration for the application
|
# fixing duration for the application
|
||||||
fix_duration = application_cfg.get("options", {}).get("fix_duration", None)
|
if "fix_duration" in application_cfg.get("options", {}):
|
||||||
if fix_duration:
|
new_application.fixing_duration = application_cfg["options"]["fix_duration"]
|
||||||
new_application.fixing_duration = fix_duration
|
|
||||||
else:
|
else:
|
||||||
msg = f"Configuration contains an invalid application type: {application_type}"
|
msg = f"Configuration contains an invalid application type: {application_type}"
|
||||||
_LOGGER.error(msg)
|
_LOGGER.error(msg)
|
||||||
|
|||||||
Reference in New Issue
Block a user