Skip to content

Commit

Permalink
Update versionChecker.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Traineratwot committed Sep 30, 2023
1 parent 20b0fe1 commit 6ec4e73
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/versionChecker.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from SimpleCache2 import simple_cache
from version_parser import Version

from src.cache import CACHE
from src.cache import CACHE, SETTINGS
from src.config import VERBOSE, PROGRAM_PATH
from src.lang import _
from src.utils import download
Expand All @@ -28,6 +28,11 @@ def selfUpdate():
current = Version(UVM_VERSION)
latest = Version(release['tag_name'])
if current < latest:
skip = SETTINGS.get("skipUpdateVersion")
if skip:
skip = Version(skip)
if skip >= latest:
return
answer = True
file = find(release)
size = math.floor(file['size'] / 1000000).__str__() + " Mb"
Expand All @@ -45,6 +50,8 @@ def selfUpdate():
exit(2)
exit(1)
pass
else:
SETTINGS.set("skipUpdateVersion", release['tag_name'])
pass


Expand Down

0 comments on commit 6ec4e73

Please sign in to comment.