From a92cbe94a1d36844eb8868139ff9c38aec6c5048 Mon Sep 17 00:00:00 2001 From: Mykola Grymalyuk Date: Sun, 21 May 2023 19:52:50 -0600 Subject: [PATCH] sys_patch.py: Add error handling for non-str entries --- resources/sys_patch/sys_patch.py | 2 ++ resources/wx_gui/gui_sys_patch.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/resources/sys_patch/sys_patch.py b/resources/sys_patch/sys_patch.py index 2a730f274..6dcf7749c 100644 --- a/resources/sys_patch/sys_patch.py +++ b/resources/sys_patch/sys_patch.py @@ -492,6 +492,8 @@ class PatchSysVolume: if Path(oclp_path).exists(): oclp_plist_data = plistlib.load(Path(oclp_path).open("rb")) for key in oclp_plist_data: + if isinstance(oclp_plist_data[key], (bool, int)): + continue if "Install" not in oclp_plist_data[key]: continue for location in oclp_plist_data[key]["Install"]: diff --git a/resources/wx_gui/gui_sys_patch.py b/resources/wx_gui/gui_sys_patch.py index 04ef262c3..116ff549e 100644 --- a/resources/wx_gui/gui_sys_patch.py +++ b/resources/wx_gui/gui_sys_patch.py @@ -522,6 +522,8 @@ class SysPatchFrame(wx.Frame): # See sys_patch_dict.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: