mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-04-14 04:38:20 +10:00
install.py: Resolve error handling in GUI
This commit is contained in:
@@ -168,9 +168,13 @@ Please build OpenCore first!"""
|
||||
# cancelled prompt
|
||||
return
|
||||
else:
|
||||
utilities.TUIOnlyPrint(
|
||||
["Copying OpenCore"], "Press [Enter] to go back.\n", ["An error occurred!"] + result.stderr.decode().split("\n") + ["", "Please report this to the devs at GitHub."]
|
||||
).start()
|
||||
if self.constants.gui_mode is False:
|
||||
utilities.TUIOnlyPrint(
|
||||
["Copying OpenCore"], "Press [Enter] to go back.\n", ["An error occurred!"] + result.stderr.decode().split("\n") + [""]
|
||||
).start()
|
||||
else:
|
||||
print("An error occurred!")
|
||||
print(result.stderr.decode().split("\n") + [""])
|
||||
return
|
||||
partition_info = plistlib.loads(subprocess.run(f"diskutil info -plist {full_disk_identifier}".split(), stdout=subprocess.PIPE).stdout.decode().strip().encode())
|
||||
parent_disk = partition_info["ParentWholeDisk"]
|
||||
@@ -242,7 +246,10 @@ Please build OpenCore first!"""
|
||||
print("\nPress [Enter] to continue.\n")
|
||||
input()
|
||||
else:
|
||||
utilities.TUIOnlyPrint(["Copying OpenCore"], "Press [Enter] to go back.\n", ["EFI failed to mount!", "Please report this to the devs at GitHub."]).start()
|
||||
if self.constants.gui_mode is False:
|
||||
utilities.TUIOnlyPrint(["Copying OpenCore"], "Press [Enter] to go back.\n", ["EFI failed to mount!"]).start()
|
||||
else:
|
||||
print("EFI failed to mount!")
|
||||
|
||||
def rmtree_handler(func, path, exc_info):
|
||||
if exc_info[0] == FileNotFoundError:
|
||||
|
||||
@@ -16,6 +16,7 @@ class OpenCoreLegacyPatcher:
|
||||
self.generate_base_data()
|
||||
if utilities.check_cli_args() is None:
|
||||
if launch_gui is True:
|
||||
utilities.disable_cls()
|
||||
from gui import gui_main
|
||||
gui_main.wx_python_gui(self.constants)
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user