Update wildcardHandler.py

Fixing problem that replacement has been tried whether POC was alarmed or ZVEI; works fine for both POC and ZVEI.

Original author might verify, works fine for me
This commit is contained in:
Florian 2016-11-25 22:48:47 +01:00 committed by GitHub
parent 1535920fc9
commit c96109899d

View file

@ -53,12 +53,13 @@ def replaceWildcards(text, data, lineBrakeAllowed=False):
# replace POC data
if "ric" in data: text = text.replace("%RIC%", data["ric"])
if "function" in data: text = text.replace("%FUNC%", data["function"])
if "function" in data:
text = text.replace("%FUNC%", data["function"])
if data["function"] == "1": text = text.replace("%FUNCTEXT%", globalVars.config.get("POC","rica"))
if data["function"] == "2": text = text.replace("%FUNCTEXT%", globalVars.config.get("POC","ricb"))
if data["function"] == "3": text = text.replace("%FUNCTEXT%", globalVars.config.get("POC","ricc"))
if data["function"] == "4": text = text.replace("%FUNCTEXT%", globalVars.config.get("POC","ricd"))
if "functionChar" in data: text = text.replace("%FUNCCHAR%", data["functionChar"])
if data["function"] == "1": text = text.replace("%FUNCTEXT%", globalVars.config.get("POC","rica"))
if data["function"] == "2": text = text.replace("%FUNCTEXT%", globalVars.config.get("POC","ricb"))
if data["function"] == "3": text = text.replace("%FUNCTEXT%", globalVars.config.get("POC","ricc"))
if data["function"] == "4": text = text.replace("%FUNCTEXT%", globalVars.config.get("POC","ricd"))
if "msg" in data: text = text.replace("%MSG%", data["msg"])
if "bitrate" in data: text = text.replace("%BITRATE%", str(data["bitrate"]))