Update update_script.py

This commit is contained in:
Saifeddine ALOUI 2024-10-08 15:51:23 +02:00 committed by GitHub
parent eed4d492d2
commit 3beb957f99
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -5,15 +5,17 @@ import subprocess
import argparse import argparse
from pathlib import Path from pathlib import Path
from ascii_colors import ASCIIColors, trace_exception from ascii_colors import ASCIIColors, trace_exception
import tkinter as tk
from tkinter import messagebox
def show_error_dialog(message): def show_error_dialog(message):
try:
import tkinter as tk
from tkinter import messagebox
root = tk.Tk() root = tk.Tk()
root.withdraw() # Hide the main window root.withdraw() # Hide the main window
messagebox.showerror("Error", message) messagebox.showerror("Error", message)
root.destroy() root.destroy()
except:
ASCIIColors.error(message)
def run_git_pull(): def run_git_pull():
try: try:
ASCIIColors.info("----------------> Updating the code <-----------------------") ASCIIColors.info("----------------> Updating the code <-----------------------")