mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2025-12-07 09:36:05 -08:00
BE: handle missing buildtimestamp.txt
Signed-off-by: jokob-sk <jokob.sk@gmail.com>
This commit is contained in:
@@ -378,7 +378,14 @@ def importConfigs (pm, db, all_plugins):
|
||||
# HANDLE APP was upgraded message - clear cache
|
||||
|
||||
# Check if app was upgraded
|
||||
with open(applicationPath + '/front/buildtimestamp.txt', 'r') as f:
|
||||
build_timestamp_path = os.path.join(applicationPath, 'front/buildtimestamp.txt')
|
||||
|
||||
# Ensure the build timestamp file exists and has an initial value
|
||||
if not os.path.exists(build_timestamp_path):
|
||||
with open(build_timestamp_path, 'w') as f:
|
||||
f.write("0")
|
||||
|
||||
with open(build_timestamp_path, 'r') as f:
|
||||
|
||||
buildTimestamp = int(f.read().strip())
|
||||
cur_version = conf.VERSION
|
||||
|
||||
Reference in New Issue
Block a user