Merge pull request #178 from flothi/patch-7

Update wildcardHandler.py
This commit is contained in:
Bastian Schroll 2016-11-26 08:14:58 +01:00 committed by GitHub
commit 9811f0b074

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"]))