Fix crashing on unknown SMBIOS

This commit is contained in:
Mykola Grymalyuk
2021-12-14 17:16:33 -07:00
parent b51beb8707
commit 0d402c4dba
+3
View File
@@ -103,6 +103,7 @@ class generate_defaults:
# Native Macs (mainly M1s) will error out as they don't know what SMBIOS to spoof to # Native Macs (mainly M1s) will error out as they don't know what SMBIOS to spoof to
# As we don't spoof on native models, we can safely ignore this # As we don't spoof on native models, we can safely ignore this
spoof_model = model spoof_model = model
try:
if smbios_data.smbios_dictionary[spoof_model]["SecureBootModel"] is not None: if smbios_data.smbios_dictionary[spoof_model]["SecureBootModel"] is not None:
if settings.sip_status is False: if settings.sip_status is False:
# Force VMM as root patching breaks .im4m signature # Force VMM as root patching breaks .im4m signature
@@ -112,3 +113,5 @@ class generate_defaults:
# Allow SecureBootModel # Allow SecureBootModel
settings.secure_status = True settings.secure_status = True
settings.force_vmm = False settings.force_vmm = False
except KeyError:
pass