diff --git a/resources/wx_gui/gui_download.py b/resources/wx_gui/gui_download.py index 81d56ac4b..8fb629042 100644 --- a/resources/wx_gui/gui_download.py +++ b/resources/wx_gui/gui_download.py @@ -79,7 +79,7 @@ class DownloadFrame(wx.Frame): ) progress_bar.SetValue(int(self.download_obj.get_percent())) - wx.GetApp().Yield() + wx.Yield() if self.download_obj.download_complete is False and self.user_cancelled is False: wx.MessageBox(f"Download failed: \n{self.download_obj.error_msg}", "Error", wx.OK | wx.ICON_ERROR) diff --git a/resources/wx_gui/gui_entry.py b/resources/wx_gui/gui_entry.py index 3100067e0..f8e57f242 100644 --- a/resources/wx_gui/gui_entry.py +++ b/resources/wx_gui/gui_entry.py @@ -83,7 +83,7 @@ class EntryPoint: logging.info("- Cleaning up wxPython GUI") self.frame.SetTransparent(0) - wx.GetApp().Yield() + wx.Yield() self.frame.DestroyChildren() self.frame.Destroy() diff --git a/resources/wx_gui/gui_install_oc.py b/resources/wx_gui/gui_install_oc.py index bc28e2e28..7d083fc40 100644 --- a/resources/wx_gui/gui_install_oc.py +++ b/resources/wx_gui/gui_install_oc.py @@ -263,7 +263,7 @@ class InstallOCFrame(wx.Frame): thread.start() while thread.is_alive(): - wx.GetApp().Yield() + wx.Yield() if self.result is True: if self.constants.update_stage != gui_support.AutoUpdateStages.INACTIVE: diff --git a/resources/wx_gui/gui_main_menu.py b/resources/wx_gui/gui_main_menu.py index 2e375ba78..d8c5fcf8b 100644 --- a/resources/wx_gui/gui_main_menu.py +++ b/resources/wx_gui/gui_main_menu.py @@ -1,7 +1,6 @@ # Generate GUI for main menu import wx import sys -import time import logging import threading diff --git a/resources/wx_gui/gui_support.py b/resources/wx_gui/gui_support.py index acf363035..b811a940d 100644 --- a/resources/wx_gui/gui_support.py +++ b/resources/wx_gui/gui_support.py @@ -9,7 +9,7 @@ import applescript from pathlib import Path from resources import constants -from data import model_array, os_data, cpu_data, smbios_data +from data import model_array, os_data, smbios_data class AutoUpdateStages: @@ -194,7 +194,7 @@ class RestartHost: if answer == wx.ID_YES: # Reboots with Count Down prompt (user can still dismiss if needed) self.frame.Hide() - wx.GetApp().Yield() + wx.Yield() try: applescript.AppleScript('tell app "loginwindow" to «event aevtrrst»').run() except applescript.ScriptError as e: @@ -270,13 +270,13 @@ class RelaunchApplicationAsRoot: # Set size of frame self.frame.SetSize((-1, countdown_label.GetPosition().y + countdown_label.GetSize().height + 40)) - wx.GetApp().Yield() + wx.Yield() logging.info(f"- Relaunching as root with command: {program_arguments}") subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) while True: - wx.GetApp().Yield() + wx.Yield() countdown_label.SetLabel(f"Closing old process in {timer} seconds") time.sleep(1) timer -= 1 diff --git a/resources/wx_gui/gui_sys_patch.py b/resources/wx_gui/gui_sys_patch.py index 94dc1537a..4ddf44ac2 100644 --- a/resources/wx_gui/gui_sys_patch.py +++ b/resources/wx_gui/gui_sys_patch.py @@ -87,7 +87,7 @@ class SysPatchFrame(wx.Frame): kdk_thread.start() while kdk_thread.is_alive(): - wx.GetApp().Yield() + wx.Yield() if self.kdk_obj.success is False: progress_bar_animation.stop_pulse() @@ -115,7 +115,7 @@ class SysPatchFrame(wx.Frame): subheader.SetLabel("Checking if checksum is valid...") subheader.Center(wx.HORIZONTAL) - wx.GetApp().Yield() + wx.Yield() progress_bar_animation.stop_pulse() @@ -372,7 +372,7 @@ class SysPatchFrame(wx.Frame): thread.start() while thread.is_alive(): - wx.GetApp().Yield() + wx.Yield() self._post_patch() self.return_button.Enable() @@ -397,7 +397,7 @@ class SysPatchFrame(wx.Frame): thread.start() while thread.is_alive(): - wx.GetApp().Yield() + wx.Yield() self._post_patch() self.return_button.Enable() diff --git a/resources/wx_gui/gui_update.py b/resources/wx_gui/gui_update.py index 75348d46e..03a43e7e5 100644 --- a/resources/wx_gui/gui_update.py +++ b/resources/wx_gui/gui_update.py @@ -147,7 +147,7 @@ class UpdateFrame(wx.Frame): while True: launch_label.SetLabel(f"Closing old process in {timer} seconds") launch_label.Center(wx.HORIZONTAL) - wx.GetApp().Yield() + wx.Yield() time.sleep(1) timer -= 1 if timer == 0: