From 66eb962f967fde0e30b824336d08c8737489ec4c Mon Sep 17 00:00:00 2001 From: drojf <1249449+drojf@users.noreply.github.com> Date: Fri, 12 Jul 2024 17:13:31 +1000 Subject: [PATCH] Remove 07th-mod server connectivity check --- cli.py | 1 - cli_interactive.py | 1 - main.py | 30 +----------------------------- 3 files changed, 1 insertion(+), 31 deletions(-) diff --git a/cli.py b/cli.py index cce6e3e9..186ae954 100644 --- a/cli.py +++ b/cli.py @@ -24,7 +24,6 @@ def main(*, game_name, game_path, mod_type, mod_options=[], is_steam=True): logger.setGlobalLogger(sys.stdout) sys.stderr = logger.StdErrRedirector(sys.stdout) common.Globals.scanForExecutables() - gui_main.check07thModServerConnection() modList = gui_main.getModList() subModList = gui_main.getSubModConfigList(modList) print("\n") diff --git a/cli_interactive.py b/cli_interactive.py index 40390c28..6cf432ed 100644 --- a/cli_interactive.py +++ b/cli_interactive.py @@ -171,7 +171,6 @@ def warnIfSavesIncompatible(fullInstallConfig): gui_main.installerCommonStartupTasks() common.Globals.scanForExecutables() - gui_main.check07thModServerConnection() modList = gui_main.getModList() subModList = gui_main.getSubModConfigList(modList) #type: List[SubModConfig] diff --git a/main.py b/main.py index 3d6e8a89..ca25fe9e 100644 --- a/main.py +++ b/main.py @@ -38,33 +38,6 @@ except ImportError: from urllib2 import urlopen, Request, HTTPError -def check07thModServerConnection(): - """ - Makes sure that we can connect to the 07th-mod server, where the mod downloads are stored. - This check is only required because Japan is blocked from downloading the 07th-mod website - the installer - already downloads a file from Github during startup, which suffices to check the internet connection. - This function/check can be removed if the block is removed. - """ - try: - _ = common.downloadFile("https://07th-mod.com/", is_text=True) - except Exception as error: - traceback.print_exc() - raise Exception("""------------------------------------------------------------------------ -Error: Couldn't reach 07th Mod Server! (https://07th-mod.com/) - -If you have a working internet connection, most likely you are in Japan, which is blocked from the 07th-mod server. -Please visit https://www.07th-mod.com - if you get a "406 Not Acceptable" error, you are definitely blocked. -As a workaround, VPNs like ProtonVPN could be used... - -Otherwise, please check the following: -- You have a working internet connection -- Check if our website is down (https://07th-mod.com/) -- Check our Wiki for more solutions: https://07th-mod.com/wiki/Installer/faq/#connection-troubleshooting ------------------------------------------------------------------------- - -Dev Error Message: {} -""".format(error)) - def getModList(is_developer=True): if is_developer and os.path.exists('installData.json'): return common.getModList("installData.json", isURL=False) @@ -277,9 +250,8 @@ def doInstallerInit(): # Run remaining init tasks concurrently t_getSubModConfig = common.makeThread(thread_getSubModConfigList) t_unimportantTasks = common.makeThread(thread_unimportantTasks) - t_check07thModServer = common.makeThread(check07thModServerConnection) - common.startAndJoinThreads([t_getSubModConfig, t_unimportantTasks, t_check07thModServer]) + common.startAndJoinThreads([t_getSubModConfig, t_unimportantTasks]) if common.Globals.DEVELOPER_MODE: fileVersionManagement.Developer_ValidateVersionDataJSON(t_getSubModConfig.result)