version check 0.1
This commit is contained in:
@@ -641,8 +641,6 @@ def main ():
|
|||||||
# re-load user configuration
|
# re-load user configuration
|
||||||
importConfig()
|
importConfig()
|
||||||
|
|
||||||
isNewVersion()
|
|
||||||
|
|
||||||
# proceed if 1 minute passed
|
# proceed if 1 minute passed
|
||||||
if last_run + datetime.timedelta(minutes=1) < time_started :
|
if last_run + datetime.timedelta(minutes=1) < time_started :
|
||||||
|
|
||||||
@@ -3241,7 +3239,7 @@ def isNewVersion():
|
|||||||
write_file (logPath + '/pialert_version_new.json', json.dumps(data))
|
write_file (logPath + '/pialert_version_new.json', json.dumps(data))
|
||||||
|
|
||||||
# make sure we received a valid response and not an API rate limit exceeded message
|
# make sure we received a valid response and not an API rate limit exceeded message
|
||||||
if len(data) > 0:
|
if len(data) > 0 and "published_at" in data:
|
||||||
|
|
||||||
dateTimeStr = data[0]["published_at"]
|
dateTimeStr = data[0]["published_at"]
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user