Skip to content

Commit

Permalink
Revert "Convert alarmHeaders to OrderedDict"
Browse files Browse the repository at this point in the history
This reverts commit 9257cb2.
  • Loading branch information
CJHarms committed Feb 19, 2018
1 parent 9257cb2 commit 3ed90b4
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions plugins/FFAgent/FFAgent.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@
#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
Expand Down Expand Up @@ -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":
Expand Down

0 comments on commit 3ed90b4

Please sign in to comment.