mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-04-24 12:00:15 +10:00
sys_patch_auto.py: Skip malformed kext plists
Anything with `GPUCompanionBundles` should have a proper plist
This commit is contained in:
@@ -350,7 +350,11 @@ class AutomaticSysPatch:
|
|||||||
for kext in Path("/Library/Extensions").glob("*.kext"):
|
for kext in Path("/Library/Extensions").glob("*.kext"):
|
||||||
if not Path(f"{kext}/Contents/Info.plist").exists():
|
if not Path(f"{kext}/Contents/Info.plist").exists():
|
||||||
continue
|
continue
|
||||||
kext_plist = plistlib.load(open(f"{kext}/Contents/Info.plist", "rb"))
|
try:
|
||||||
|
kext_plist = plistlib.load(open(f"{kext}/Contents/Info.plist", "rb"))
|
||||||
|
except Exception as e:
|
||||||
|
logging.info(f" - Failed to load plist for {kext.name}: {e}")
|
||||||
|
continue
|
||||||
if "GPUCompanionBundles" not in kext_plist:
|
if "GPUCompanionBundles" not in kext_plist:
|
||||||
continue
|
continue
|
||||||
logging.info(f" - Found kext with GPUCompanionBundles: {kext.name}")
|
logging.info(f" - Found kext with GPUCompanionBundles: {kext.name}")
|
||||||
|
|||||||
Reference in New Issue
Block a user