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
|
||||
).result()
|
||||
base_cfg["klipper"]["type"] = get_app_type(base_cfg["klipper"]["path"])
|
||||
if config.has_option("channel"):
|
||||
channel = config.get("channel")
|
||||
base_cfg["moonraker"]["channel"] = channel
|
||||
base_cfg["klipper"]["channel"] = channel
|
||||
channel = config.get("channel", "dev")
|
||||
base_cfg["moonraker"]["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)
|
||||
|
|
|
@ -109,9 +109,10 @@ class UpdateManager:
|
|||
cfg = config[section]
|
||||
name = section.split()[-1]
|
||||
if name in self.updaters:
|
||||
self.server.add_warning(
|
||||
f"[update_manager]: Extension {name} already added"
|
||||
)
|
||||
if name not in ["klipper", "moonraker"]:
|
||||
self.server.add_warning(
|
||||
f"[update_manager]: Extension {name} already added"
|
||||
)
|
||||
continue
|
||||
try:
|
||||
client_type = cfg.get("type")
|
||||
|
|
Loading…
Reference in New Issue