add: error message in case of connection problem

This commit is contained in:
Yannik Schmidt
2025-06-07 13:02:15 +02:00
parent 94aaf97a4d
commit 1b11b46723

View File

@@ -11,6 +11,8 @@ import imagetools
import webbrowser import webbrowser
import statekeeper import statekeeper
import infowidget import infowidget
import requests
import tkinter
customtkinter.set_appearance_mode("dark") customtkinter.set_appearance_mode("dark")
customtkinter.set_default_color_theme("blue") customtkinter.set_default_color_theme("blue")
@@ -387,5 +389,9 @@ if __name__ == "__main__":
app.update() app.update()
# fill and run app # # 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() app.mainloop()