From e330067cb85e108d2d47765198f03bafbc6d9324 Mon Sep 17 00:00:00 2001 From: Tumppi066 <83072683+Tumppi066@users.noreply.github.com> Date: Mon, 11 Nov 2024 14:44:48 +0200 Subject: [PATCH] Fix crash in countries where you cannot access github. --- blog/V1.11.Minor.md | 3 +++ changelog.txt | 2 +- src/updater.py | 22 ++++++++++++++-------- version.txt | 2 +- 4 files changed, 19 insertions(+), 10 deletions(-) diff --git a/blog/V1.11.Minor.md b/blog/V1.11.Minor.md index 587d7dc73..843544433 100644 --- a/blog/V1.11.Minor.md +++ b/blog/V1.11.Minor.md @@ -23,6 +23,9 @@ title: Version 1.11 > Minor This changelog will contain all changes from 1.11.0 onwards before the next major version. !!! +==- Version 1.11.77 +Fix crash in countries where you cannot access github. +[!badge variant="dark" text="Tumppi066"] [!badge variant="ghost" text="Backend"] ==- Version 1.11.76 Fix crash when profile folder does not exist yet. [!badge variant="dark" text="Tumppi066"] [!badge variant="ghost" text="Backend"] diff --git a/changelog.txt b/changelog.txt index b3866a0da..47ae7cf34 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1 +1 @@ -Fix crash when profile folder does not exist yet. \ No newline at end of file +Fix crash in countries where you cannot access github. \ No newline at end of file diff --git a/src/updater.py b/src/updater.py index f3e485fdc..8c3c7ab00 100644 --- a/src/updater.py +++ b/src/updater.py @@ -26,14 +26,20 @@ def UpdateChecker(): print("Failed to check for updates") print("Please check your internet connection and try again later") return - if int(currentVer[0]) < int(remoteVer[0]): - update = True - elif int(currentVer[1]) < int(remoteVer[1]): - update = True - elif int(currentVer[2]) < int(remoteVer[2]): - update = True - else: - update = False + + try: + if int(currentVer[0]) < int(remoteVer[0]): + update = True + elif int(currentVer[1]) < int(remoteVer[1]): + update = True + elif int(currentVer[2]) < int(remoteVer[2]): + update = True + else: + update = False + except: + print("Failed to check for updates") + print("Your PC cannot access github") + return if remote == "github": url = githubUrl diff --git a/version.txt b/version.txt index 6a20d2c5a..002bfa39f 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -1.11.76 \ No newline at end of file +1.11.77 \ No newline at end of file