From 1b11b467235c7d4810c094502e73e0245541a23e Mon Sep 17 00:00:00 2001 From: Yannik Schmidt Date: Sat, 7 Jun 2025 13:02:15 +0200 Subject: [PATCH] add: error message in case of connection problem --- client.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/client.py b/client.py index 8651828..e808466 100644 --- a/client.py +++ b/client.py @@ -11,6 +11,8 @@ import imagetools import webbrowser import statekeeper import infowidget +import requests +import tkinter customtkinter.set_appearance_mode("dark") customtkinter.set_default_color_theme("blue") @@ -387,5 +389,9 @@ if __name__ == "__main__": app.update() # fill and run app # - load_main() # TODO add button to reopen config # TODO add button to purge cache/purge cache window # TODO show game size on remote + try: + load_main() # TODO add button to reopen config # TODO add button to purge cache/purge cache window # TODO show game size on remote + except requests.exceptions.ConnectionError as e: + app.withdraw() + tkinter.messagebox.showerror("There was a connection problem", str(e)) app.mainloop()