From 9faa0e1ca083f978b96c19aa5f80be6ea3c679bd Mon Sep 17 00:00:00 2001 From: jowj Date: Sun, 2 Dec 2018 21:25:54 -0600 Subject: [PATCH] Index into results array to be able to pull key/value --- arke.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arke.py b/arke.py index 27bf6b3..ea62fa9 100644 --- a/arke.py +++ b/arke.py @@ -44,7 +44,7 @@ while is_on: for line in json_File: results.append(json.loads(line)) - for key,value in results.items(): + for key,value in results[-1].items(): if stateChanged == True: errorFile = open("/shared/alerts.log", "w") errorText = key + "returned with" + str(value) + "\n"