mirror of
https://github.com/Schrolli91/BOSWatch.git
synced 2026-01-11 02:50:00 +01:00
Revert "Convert alarmHeaders to OrderedDict"
This reverts commit 9257cb2cfe.
This commit is contained in:
parent
9257cb2cfe
commit
3ed90b4a97
|
|
@ -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":
|
||||
|
|
|
|||
Loading…
Reference in a new issue