mirror of
https://github.com/outbackdingo/OpCore-Simplify.git
synced 2026-01-27 10:19:49 +00:00
Add detailed error info for easier debugging
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import os
|
||||
import sys
|
||||
import json
|
||||
import plistlib
|
||||
import shutil
|
||||
@@ -217,28 +218,9 @@ class Utils:
|
||||
cols = max(len(line) for line in lines) if lines else 0
|
||||
print('\033[8;{};{}t'.format(max(rows+6, 30), max(cols+2, 100)))
|
||||
|
||||
@staticmethod
|
||||
def message(text, msg_type="attention"):
|
||||
# ANSI escape codes for different colors and bold font
|
||||
RED_BOLD = "\033[1;31m"
|
||||
YELLOW_BOLD = "\033[1;33m"
|
||||
CYAN_BOLD = "\033[1;36m"
|
||||
RESET = "\033[0m"
|
||||
|
||||
if msg_type == "attention":
|
||||
color_code = RED_BOLD
|
||||
elif msg_type == "warning":
|
||||
color_code = YELLOW_BOLD
|
||||
elif msg_type == "reminder":
|
||||
color_code = CYAN_BOLD
|
||||
else:
|
||||
color_code = RESET
|
||||
|
||||
return "{}{}{}".format(color_code, text, RESET)
|
||||
|
||||
def exit_program(self, custom_content=""):
|
||||
def exit_program(self):
|
||||
self.head()
|
||||
print(custom_content)
|
||||
print("")
|
||||
print("For more information, to report errors, or to contribute to the product:")
|
||||
print("* Facebook: https://www.facebook.com/macforce2601")
|
||||
print("* Telegram: https://t.me/lzhoang2601")
|
||||
@@ -246,4 +228,5 @@ class Utils:
|
||||
print("")
|
||||
|
||||
print("Thank you for using our program!\n")
|
||||
exit(0)
|
||||
self.request_input("Press Enter to exit.")
|
||||
sys.exit(0)
|
||||
Reference in New Issue
Block a user