From 87f9f3917937e50471f1fab2c215814b0e968e15 Mon Sep 17 00:00:00 2001 From: Mykola Grymalyuk Date: Tue, 16 May 2023 12:35:47 -0600 Subject: [PATCH] GUI Update: Break on error --- resources/wx_gui/gui_settings.py | 5 ++++- resources/wx_gui/gui_update.py | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/resources/wx_gui/gui_settings.py b/resources/wx_gui/gui_settings.py index f5a00622b..9142b5463 100644 --- a/resources/wx_gui/gui_settings.py +++ b/resources/wx_gui/gui_settings.py @@ -786,11 +786,14 @@ class SettingsFrame(wx.Frame): "Check CHANGELOG before blindly updating.", ], }, + "wrap_around 1": { + "type": "wrap_around", + }, "Export constants": { "type": "button", "function": self.on_export_constants, "description": [ - "Export constants.py values to a plist file.", + "Export constants.py values to a txt file.", ], }, }, diff --git a/resources/wx_gui/gui_update.py b/resources/wx_gui/gui_update.py index 43e3835b6..75348d46e 100644 --- a/resources/wx_gui/gui_update.py +++ b/resources/wx_gui/gui_update.py @@ -175,6 +175,8 @@ class UpdateFrame(wx.Frame): wx.CallAfter(self.progress_bar.SetValue, 0) wx.CallAfter(wx.MessageBox, f"Failed to extract update. Error: {result.stderr.decode('utf-8')}", "Critical Error!", wx.OK | wx.ICON_ERROR) wx.CallAfter(sys.exit, 1) + break + if Path(self.application_path).exists(): break @@ -182,6 +184,7 @@ class UpdateFrame(wx.Frame): wx.CallAfter(self.progress_bar.SetValue, 0) wx.CallAfter(wx.MessageBox, "Failed to extract update. Error: Update file does not exist", "Critical Error!", wx.OK | wx.ICON_ERROR) wx.CallAfter(sys.exit, 1) + break def _install_update(self) -> None: