mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2025-12-07 01:26:11 -08:00
PLG: SNMPDSC typo
This commit is contained in:
@@ -768,11 +768,19 @@ def collect_lang_strings(json, pref, stringSqlParams):
|
||||
return stringSqlParams
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
def checkNewVersion():
|
||||
mylog('debug', [f"[Version check] Checking if new version available"])
|
||||
# Get the value from the buildtimestamp.txt and initialize it if missing
|
||||
def getBuildTimeStamp():
|
||||
"""
|
||||
Retrieves the build timestamp from 'front/buildtimestamp.txt' within the
|
||||
application directory.
|
||||
|
||||
newVersion = False
|
||||
If the file does not exist, it is created and initialized with the value '0'.
|
||||
|
||||
Returns:
|
||||
int: The integer value of the build timestamp read from the file.
|
||||
Returns 0 if the file is empty or just initialized.
|
||||
"""
|
||||
buildTimestamp = 0
|
||||
build_timestamp_path = os.path.join(applicationPath, 'front/buildtimestamp.txt')
|
||||
|
||||
# Ensure file exists, initialize if missing
|
||||
@@ -784,6 +792,16 @@ def checkNewVersion():
|
||||
with open(build_timestamp_path, 'r') as f:
|
||||
buildTimestamp = int(f.read().strip() or 0)
|
||||
|
||||
return buildTimestamp
|
||||
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
def checkNewVersion():
|
||||
mylog('debug', [f"[Version check] Checking if new version available"])
|
||||
|
||||
newVersion = False
|
||||
buildTimestamp = getBuildTimeStamp()
|
||||
|
||||
try:
|
||||
response = requests.get(
|
||||
"https://api.github.com/repos/jokob-sk/NetAlertX/releases",
|
||||
|
||||
Reference in New Issue
Block a user