From 8e1809cf3d04fe52a559a86119ed9969d563b950 Mon Sep 17 00:00:00 2001 From: Mykola Grymalyuk <48863253+khronokernel@users.noreply.github.com> Date: Sun, 23 May 2021 11:37:48 -0600 Subject: [PATCH] Fix pythong 3.8 support and XhciDxe Closes https://github.com/dortania/OpenCore-Legacy-Patcher/issues/240 --- Resources/Build.py | 2 +- Resources/SysPatch.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Resources/Build.py b/Resources/Build.py index b9c86b6e4..77eabfe80 100644 --- a/Resources/Build.py +++ b/Resources/Build.py @@ -489,7 +489,7 @@ class BuildOpenCore: print("- Adding OpenCanopy GUI") shutil.rmtree(self.constants.resources_path, onerror=rmtree_handler) shutil.copy(self.constants.gui_path, self.constants.oc_folder) - self.config["UEFI"]["Drivers"] = ["OpenCanopy.efi", "OpenRuntime.efi"] + self.config["UEFI"]["Drivers"] += ["OpenCanopy.efi", "OpenRuntime.efi"] # Exfat check if self.model in ModelArray.NoExFat: print("- Adding ExFatDxeLegacy.efi") diff --git a/Resources/SysPatch.py b/Resources/SysPatch.py index 5d51a81d4..ff6077da0 100644 --- a/Resources/SysPatch.py +++ b/Resources/SysPatch.py @@ -36,7 +36,7 @@ class PatchSysVolume: self.mount_lauchd = f"{self.mount_location}/System/Library/LaunchDaemons" self.mount_private_frameworks = f"{self.mount_location}/System/Library/PrivateFrameworks" - def elevated(self, *args, **kwargs) -> subprocess.CompletedProcess[Any]: + def elevated(self, *args, **kwargs) -> subprocess.CompletedProcess([Any], returncode=0): if os.getuid() == 0: return subprocess.run(*args, **kwargs) else: @@ -54,7 +54,7 @@ class PatchSysVolume: if print_status is True: print(f"- {current_sip_bit}\t {temp}") i = i + 1 - + sip_needs_change = all( self.constants.csr_values[i] for i in [ @@ -178,7 +178,7 @@ class PatchSysVolume: else: if self.constants.recovery_status is True: print("- Mounting drive as writable in Recovery") - + umount_drive = plistlib.loads(subprocess.run(f"diskutil info -plist {self.root_mount_path}".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode()) umount_drive = umount_drive["VolumeName"] self.elevated(["umount", f'/Volumes/{umount_drive}'], stdout=subprocess.PIPE).stdout.decode().strip().encode()