From 3ed90b4a97c6c8aa39bdedf36ca0b6e3e2d4809f Mon Sep 17 00:00:00 2001 From: CJHarms Date: Mon, 19 Feb 2018 17:37:02 +0100 Subject: [PATCH] Revert "Convert alarmHeaders to OrderedDict" This reverts commit 9257cb2cfe654295ae23950e3bc57900c154ea73. --- plugins/FFAgent/FFAgent.py | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/plugins/FFAgent/FFAgent.py b/plugins/FFAgent/FFAgent.py index 759ec19..561ca86 100644 --- a/plugins/FFAgent/FFAgent.py +++ b/plugins/FFAgent/FFAgent.py @@ -18,9 +18,6 @@ from includes import globalVars # Global variables #from includes.helper import timeHandler from includes.helper import configHandler -# needed for Ordered Dictionaries to serve correctly ordered JSON -from collections import OrderedDict - ## # # onLoad (init) function of plugin @@ -128,13 +125,13 @@ def run(typ,freq,data): alarmData = json.dumps(alarmData) logging.debug(alarmData) - alarmHeaders = OrderedDict([ - ("Content-Type", "application/json"), - ("webApiToken", webApiToken), - ("accessToken", accessToken), - ("selectiveCallCode", selectiveCallCode), - ("hmac", hmac.new(webApiKey, webApiToken + selectiveCallCode + accessToken + alarmData, digestmod=hashlib.sha256).hexdigest()) - ]) + alarmHeaders = { + "Content-Type": "application/json", + "webApiToken": webApiToken, + "accessToken": accessToken, + "selectiveCallCode": selectiveCallCode, + "hmac": hmac.new(webApiKey, webApiToken + selectiveCallCode + accessToken + alarmData, digestmod=hashlib.sha256).hexdigest() + } logging.debug(alarmHeaders) if globalVars.config.get("FFAgent", "live") == "1":