Update syntax

master
jowj 5 years ago
parent c416d79574
commit 6e6a51d445

@ -25,7 +25,7 @@ while is_on:
# track state # track state
file = open("/shared/results.json", "r") file = open("/shared/results.json", "r")
oldData = file.read() oldData = file.read()
if oldData = json_string: if oldData == json_string:
changed = False changed = False
else: else:
changed = True changed = True
@ -46,7 +46,7 @@ while is_on:
for key,value in results[-1].items(): for key,value in results[-1].items():
if value != 200: if value != 200:
if state = True: if state == True:
errorFile = open("/shared/alerts.log", "w") errorFile = open("/shared/alerts.log", "w")
errorText = key + " is down." + "\n" errorText = key + " is down." + "\n"
errorFile.write(errorText) errorFile.write(errorText)

Loading…
Cancel
Save