diff --git a/source/check_update.py b/source/check_update.py index 5d6def6..d08d77f 100644 --- a/source/check_update.py +++ b/source/check_update.py @@ -1,4 +1,4 @@ -from . import * +from tkinter import messagebox import requests import zipfile import json @@ -40,5 +40,11 @@ def check_update(self): os.startfile(os.path.realpath("./Updater/Updater.exe")) sys.exit() + except requests.ConnectionError: + messagebox.showwarning(self.translate("Attention"), + self.translate("Impossible de se connecter à internet. Le téléchargement sera " + "automatiquement désactivé.")) + self.option["disable_download"] = True + except: self.log_error() diff --git a/translation.json b/translation.json index 504e193..3c0a791 100644 --- a/translation.json +++ b/translation.json @@ -1,5 +1,6 @@ { "en": { + "Impossible de se connecter à internet. Le téléchargement sera automatiquement désactivé.": "Can't connect to internet, download will automatically be disabled.", "Patch main.dol": "Patch main.dol", "Patch lecode.bin": "Patch lecode.bin", "Installation du mod": "Installing mod",