From 78760b8a0806c337d2bb60dcb84b8acc168e2e4c Mon Sep 17 00:00:00 2001 From: Mykola Grymalyuk <48863253+khronokernel@users.noreply.github.com> Date: Wed, 12 May 2021 08:42:05 -0600 Subject: [PATCH] Fix crashing when Wireless module not present --- CHANGELOG.md | 1 + Resources/Build.py | 5 ++++- Resources/DeviceProbe.py | 10 ++++++++-- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f355512cf..eeb6e13a2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # OpenCore Legacy Patcher changelog ## 0.1.5 +- Fix crashing when Wireless module not present ## 0.1.4 - Fix Device Path formatting on 2012+ iMacs diff --git a/Resources/Build.py b/Resources/Build.py index 7a9e6b2da..f516a4672 100644 --- a/Resources/Build.py +++ b/Resources/Build.py @@ -46,7 +46,10 @@ class BuildOpenCore: def build_efi(self): Utilities.cls() - print(f"Building Configuration for model: {self.model}") + if not self.constants.custom_model: + print(f"Building Configuration on model: {self.model}") + else: + print(f"Building Configuration for external model: {self.model}") if not Path(self.constants.build_path).exists(): Path(self.constants.build_path).mkdir() print("Created build folder") diff --git a/Resources/DeviceProbe.py b/Resources/DeviceProbe.py index 866fef3cf..df3729502 100644 --- a/Resources/DeviceProbe.py +++ b/Resources/DeviceProbe.py @@ -71,8 +71,11 @@ class pci_probe: print(f"- No ACPI entry found for {gpu_type}") return vendor_id, device_id, "" except ValueError: - print(f"- No IOService entry found for {gpu_type}") + print(f"- No IOService entry found for {gpu_type} (V)") return "", "", "" + except IndexError: + print(f"- No IOService entry found for {gpu_type} (I)") + return "", "", "", "" def wifi_probe(self): try: @@ -92,5 +95,8 @@ class pci_probe: print(f"- No ACPI entry found for {vendor_id}:{device_id}") return vendor_id, device_id, ioname, "" except ValueError: - print(f"- No IOService entry found for Wireless Card") + print(f"- No IOService entry found for Wireless Card (V)") + return "", "", "", "" + except IndexError: + print(f"- No IOService entry found for Wireless Card (I)") return "", "", "", "" \ No newline at end of file