From 1f9d896e174a5129b89db977ee24818efd270e74 Mon Sep 17 00:00:00 2001 From: Arksine Date: Wed, 3 Mar 2021 16:55:38 -0500 Subject: [PATCH] update_manager: attempt client archive download before removing old client files Signed-off-by: Eric Callahan --- moonraker/plugins/update_manager.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/moonraker/plugins/update_manager.py b/moonraker/plugins/update_manager.py index 77ea25f..7b8f0af 100644 --- a/moonraker/plugins/update_manager.py +++ b/moonraker/plugins/update_manager.py @@ -937,6 +937,8 @@ class WebUpdater: if self.version == self.remote_version: # Already up to date return + self.notify_update_response(f"Downloading Client: {self.name}") + archive = await self.umgr.http_download_request(self.dl_url) with tempfile.TemporaryDirectory( suffix=self.name, prefix="client") as tempdir: if os.path.isdir(self.path): @@ -949,8 +951,6 @@ class WebUpdater: shutil.move(src_path, dest_dir) shutil.rmtree(self.path) os.mkdir(self.path) - self.notify_update_response(f"Downloading Client: {self.name}") - archive = await self.umgr.http_download_request(self.dl_url) with zipfile.ZipFile(io.BytesIO(archive)) as zf: zf.extractall(self.path) # Move temporary files back into