mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-06-20 06:10:00 +10:00
Adjust KeyError level
Closes https://github.com/dortania/OpenCore-Legacy-Patcher/issues/745
This commit is contained in:
@@ -488,16 +488,16 @@ class Computer:
|
|||||||
# Each AHCI controller will have its own entry
|
# Each AHCI controller will have its own entry
|
||||||
# Skip entries that are AHCI PCIe controllers
|
# Skip entries that are AHCI PCIe controllers
|
||||||
# Apple's AHCI PCIe controller will report 'PCI' interconnect
|
# Apple's AHCI PCIe controller will report 'PCI' interconnect
|
||||||
if ahci_controller["spsata_physical_interconnect"] == "SATA":
|
try:
|
||||||
# Note: 'spsata_physical_interconnect' was not introduced till 10.9
|
if ahci_controller["spsata_physical_interconnect"] == "SATA":
|
||||||
for port in ahci_controller["_items"]:
|
for port in ahci_controller["_items"]:
|
||||||
try:
|
|
||||||
if port["spsata_medium_type"] == "Solid State" and "apple" not in port["device_model"].lower():
|
if port["spsata_medium_type"] == "Solid State" and "apple" not in port["device_model"].lower():
|
||||||
self.third_party_sata_ssd = True
|
self.third_party_sata_ssd = True
|
||||||
# Bail out of loop as we only need to know if there are any third-party SSDs present
|
# Bail out of loop as we only need to know if there are any third-party SSDs present
|
||||||
break
|
break
|
||||||
except KeyError:
|
except KeyError:
|
||||||
# SATA Optical Disk Drives don't report 'spsata_medium_type'
|
# Notes:
|
||||||
continue
|
# - SATA Optical Disk Drives don't report 'spsata_medium_type'
|
||||||
print(f"SATA 3rd Party: {self.third_party_sata_ssd}")
|
# - 'spsata_physical_interconnect' was not introduced till 10.9
|
||||||
|
continue
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user