From 9ef569e949a50de16db3dfafb1801ccc18127ea8 Mon Sep 17 00:00:00 2001 From: Mykola Grymalyuk Date: Tue, 3 Sep 2024 17:20:20 -0600 Subject: [PATCH] wx_gui: Add handling for new patchset format --- .../wx_gui/gui_sys_patch_display.py | 12 +----------- .../wx_gui/gui_sys_patch_start.py | 12 +----------- 2 files changed, 2 insertions(+), 22 deletions(-) diff --git a/opencore_legacy_patcher/wx_gui/gui_sys_patch_display.py b/opencore_legacy_patcher/wx_gui/gui_sys_patch_display.py index 074bb81ae..4c309c43a 100644 --- a/opencore_legacy_patcher/wx_gui/gui_sys_patch_display.py +++ b/opencore_legacy_patcher/wx_gui/gui_sys_patch_display.py @@ -321,17 +321,7 @@ class SysPatchDisplayFrame(wx.Frame): if (not patch.startswith("Settings") and not patch.startswith("Validation") and patches[patch] is True): # Patches should share the same name as the plist key # See sys_patch/patchsets/base.py for more info - patch_installed = False - for key in oclp_plist_data: - if isinstance(oclp_plist_data[key], (bool, int)): - continue - if "Display Name" not in oclp_plist_data[key]: - continue - if oclp_plist_data[key]["Display Name"] == patch: - patch_installed = True - break - - if patch_installed is False: + if patch not in oclp_plist_data: logging.info(f"- Patch {patch} not installed") return True diff --git a/opencore_legacy_patcher/wx_gui/gui_sys_patch_start.py b/opencore_legacy_patcher/wx_gui/gui_sys_patch_start.py index 032604435..c28d146ff 100644 --- a/opencore_legacy_patcher/wx_gui/gui_sys_patch_start.py +++ b/opencore_legacy_patcher/wx_gui/gui_sys_patch_start.py @@ -460,17 +460,7 @@ class SysPatchStartFrame(wx.Frame): if (not patch.startswith("Settings") and not patch.startswith("Validation") and patches[patch] is True): # Patches should share the same name as the plist key # See sys_patch/patchsets/base.py for more info - patch_installed = False - for key in oclp_plist_data: - if isinstance(oclp_plist_data[key], (bool, int)): - continue - if "Display Name" not in oclp_plist_data[key]: - continue - if oclp_plist_data[key]["Display Name"] == patch: - patch_installed = True - break - - if patch_installed is False: + if patch not in oclp_plist_data: logging.info(f"- Patch {patch} not installed") return True