Keinen Default für priority

Ist kein Wert oder ein anderer Wert als true/false für priority gesetzt, wird ein Divera-Alarm ausgelassen.
This commit is contained in:
grosj 2019-11-04 08:19:41 +01:00 committed by GitHub
parent 0dfe1ee89c
commit ddbddbbcdd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -83,7 +83,7 @@ def run(typ, freq, data):
elif data["function"] == '4':
priority = globalVars.config.get("Divera", "SubD")
else:
priority = 'false'
priority = ''
text = globalVars.config.get("Divera", "poc_text")
title = globalVars.config.get("Divera", "poc_title")
@ -109,7 +109,8 @@ def run(typ, freq, data):
# check priority value
if (priority != 'false') and (priority != 'true'):
priority = 'false'
logging.info("No Priority set for type '%s'! Skipping Divera-Alarm!", typ)
return
# start the connection
conn = httplib.HTTPSConnection("www.divera247.com:443")