mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-04-24 20:10:14 +10:00
Fix save
This commit is contained in:
@@ -24,7 +24,7 @@ def human_fmt(num):
|
|||||||
def rmtree_handler(func, path, exc_info):
|
def rmtree_handler(func, path, exc_info):
|
||||||
if exc_info[0] == FileNotFoundError:
|
if exc_info[0] == FileNotFoundError:
|
||||||
return
|
return
|
||||||
raise
|
raise # pylint: disable=misplaced-bare-raise
|
||||||
|
|
||||||
|
|
||||||
class BuildOpenCore:
|
class BuildOpenCore:
|
||||||
@@ -139,8 +139,6 @@ class BuildOpenCore:
|
|||||||
shutil.copy(self.constants.gui_path, self.constants.oc_folder)
|
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"]
|
||||||
|
|
||||||
plistlib.dump(self.config, Path(self.constants.plist_path).open("wb"), sort_keys=True)
|
|
||||||
|
|
||||||
def set_smbios(self):
|
def set_smbios(self):
|
||||||
spoofed_model = self.model
|
spoofed_model = self.model
|
||||||
if self.model in ModelArray.MacBookAir61:
|
if self.model in ModelArray.MacBookAir61:
|
||||||
@@ -203,6 +201,7 @@ class BuildOpenCore:
|
|||||||
|
|
||||||
def cleanup(self):
|
def cleanup(self):
|
||||||
print("- Cleaning up files")
|
print("- Cleaning up files")
|
||||||
|
plistlib.dump(self.config, Path(self.constants.plist_path).open("wb"), sort_keys=True)
|
||||||
for kext in self.constants.kexts_path.rglob("*.zip"):
|
for kext in self.constants.kexts_path.rglob("*.zip"):
|
||||||
with zipfile.ZipFile(kext) as zip_file:
|
with zipfile.ZipFile(kext) as zip_file:
|
||||||
zip_file.extractall(self.constants.kexts_path)
|
zip_file.extractall(self.constants.kexts_path)
|
||||||
|
|||||||
Reference in New Issue
Block a user