From 3beb957f9964524e65f880d8375c05da39e5a552 Mon Sep 17 00:00:00 2001 From: Saifeddine ALOUI Date: Tue, 8 Oct 2024 15:51:23 +0200 Subject: [PATCH] Update update_script.py --- update_script.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/update_script.py b/update_script.py index 5c9cd92c..cc5d0493 100644 --- a/update_script.py +++ b/update_script.py @@ -5,15 +5,17 @@ import subprocess import argparse from pathlib import Path from ascii_colors import ASCIIColors, trace_exception -import tkinter as tk -from tkinter import messagebox def show_error_dialog(message): - root = tk.Tk() - root.withdraw() # Hide the main window - messagebox.showerror("Error", message) - root.destroy() - + try: + import tkinter as tk + from tkinter import messagebox + root = tk.Tk() + root.withdraw() # Hide the main window + messagebox.showerror("Error", message) + root.destroy() + except: + ASCIIColors.error(message) def run_git_pull(): try: ASCIIColors.info("----------------> Updating the code <-----------------------")