update_manager: update base channel config
Allow independent channel configuration for Moonraker and Klipper. Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
parent
a1e786fd73
commit
5f43536612
|
@ -67,8 +67,13 @@ def get_base_configuration(config: ConfigHelper) -> ConfigHelper:
|
||||||
"moonraker", "update_manager.klipper_exec", KLIPPER_DEFAULT_EXEC
|
"moonraker", "update_manager.klipper_exec", KLIPPER_DEFAULT_EXEC
|
||||||
).result()
|
).result()
|
||||||
base_cfg["klipper"]["type"] = get_app_type(base_cfg["klipper"]["path"])
|
base_cfg["klipper"]["type"] = get_app_type(base_cfg["klipper"]["path"])
|
||||||
if config.has_option("channel"):
|
channel = config.get("channel", "dev")
|
||||||
channel = config.get("channel")
|
base_cfg["moonraker"]["channel"] = channel
|
||||||
base_cfg["moonraker"]["channel"] = channel
|
base_cfg["klipper"]["channel"] = channel
|
||||||
base_cfg["klipper"]["channel"] = channel
|
if config.has_section("update_manager moonraker"):
|
||||||
|
mcfg = config["update_manager moonraker"]
|
||||||
|
base_cfg["moonraker"]["channel"] = mcfg.get("channel", channel)
|
||||||
|
if config.has_section("update_manager klipper"):
|
||||||
|
kcfg = config["update_manager klipper"]
|
||||||
|
base_cfg["klipper"]["channel"] = kcfg.get("channel", channel)
|
||||||
return config.read_supplemental_dict(base_cfg)
|
return config.read_supplemental_dict(base_cfg)
|
||||||
|
|
|
@ -109,9 +109,10 @@ class UpdateManager:
|
||||||
cfg = config[section]
|
cfg = config[section]
|
||||||
name = section.split()[-1]
|
name = section.split()[-1]
|
||||||
if name in self.updaters:
|
if name in self.updaters:
|
||||||
self.server.add_warning(
|
if name not in ["klipper", "moonraker"]:
|
||||||
f"[update_manager]: Extension {name} already added"
|
self.server.add_warning(
|
||||||
)
|
f"[update_manager]: Extension {name} already added"
|
||||||
|
)
|
||||||
continue
|
continue
|
||||||
try:
|
try:
|
||||||
client_type = cfg.get("type")
|
client_type = cfg.get("type")
|
||||||
|
|
Loading…
Reference in New Issue