update_manager: fix klipper path regression
Commit 7401192
introduced a regression where the saved klipper
paths were not loaded into the Update object.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
parent
287982acdd
commit
b4ad6692e3
|
@ -87,20 +87,20 @@ class UpdateManager:
|
||||||
if config.getboolean('enable_system_updates', True):
|
if config.getboolean('enable_system_updates', True):
|
||||||
self.updaters['system'] = PackageDeploy(config, self.cmd_helper)
|
self.updaters['system'] = PackageDeploy(config, self.cmd_helper)
|
||||||
db: DBComp = self.server.lookup_component('database')
|
db: DBComp = self.server.lookup_component('database')
|
||||||
kpath = db.get_item("moonraker", "klipper_path",
|
kpath = db.get_item("moonraker", "update_manager.klipper_path",
|
||||||
KLIPPER_DEFAULT_PATH)
|
KLIPPER_DEFAULT_PATH)
|
||||||
kenv_path = db.get_item("moonraker", "klipper_exec",
|
kenv_path = db.get_item("moonraker", "update_manager.klipper_exec",
|
||||||
KLIPPER_DEFAULT_EXEC)
|
KLIPPER_DEFAULT_EXEC)
|
||||||
if (
|
if (
|
||||||
os.path.exists(kpath) and
|
os.path.exists(kpath) and
|
||||||
os.path.exists(kenv_path)
|
os.path.exists(kenv_path)
|
||||||
):
|
):
|
||||||
self.updaters['klipper'] = get_deploy_class(KLIPPER_DEFAULT_PATH)(
|
self.updaters['klipper'] = get_deploy_class(kpath)(
|
||||||
self.app_config[f"update_manager klipper"], self.cmd_helper,
|
self.app_config[f"update_manager klipper"], self.cmd_helper,
|
||||||
{
|
{
|
||||||
'channel': self.channel,
|
'channel': self.channel,
|
||||||
'path': KLIPPER_DEFAULT_PATH,
|
'path': kpath,
|
||||||
'executable': KLIPPER_DEFAULT_EXEC
|
'executable': kenv_path
|
||||||
})
|
})
|
||||||
else:
|
else:
|
||||||
self.updaters['klipper'] = BaseDeploy(
|
self.updaters['klipper'] = BaseDeploy(
|
||||||
|
@ -213,8 +213,8 @@ class UpdateManager:
|
||||||
return
|
return
|
||||||
# Update paths in the database
|
# Update paths in the database
|
||||||
db: DBComp = self.server.lookup_component('database')
|
db: DBComp = self.server.lookup_component('database')
|
||||||
db.insert_item("moonraker", "klipper_path", kpath)
|
db.insert_item("moonraker", "update_manager.klipper_path", kpath)
|
||||||
db.insert_item("moonraker", "klipper_exec", executable)
|
db.insert_item("moonraker", "update_manager.klipper_exec", executable)
|
||||||
need_notification = not isinstance(kupdater, AppDeploy)
|
need_notification = not isinstance(kupdater, AppDeploy)
|
||||||
self.updaters['klipper'] = get_deploy_class(kpath)(
|
self.updaters['klipper'] = get_deploy_class(kpath)(
|
||||||
self.app_config[f"update_manager klipper"], self.cmd_helper,
|
self.app_config[f"update_manager klipper"], self.cmd_helper,
|
||||||
|
|
Loading…
Reference in New Issue