diff --git a/JsonPreprocessor/CJsonPreprocessor.py b/JsonPreprocessor/CJsonPreprocessor.py index 16caccbf..b46da43a 100644 --- a/JsonPreprocessor/CJsonPreprocessor.py +++ b/JsonPreprocessor/CJsonPreprocessor.py @@ -371,7 +371,7 @@ def __nestedParamHandler(self, sInputStr : str) -> str: exec(sExec, globals(), ldict) tmpValue = ldict['value'] except: - raise Exception("fThe variable '{fullVariable}' is not available!") + raise Exception(f"The variable '{fullVariable}' is not available!") pattern = re.sub('\[', '\\[', fullVariable) pattern = re.sub('\]', '\\]', pattern) sInputStr = re.sub('\\' + pattern, '\'' + tmpValue + '\'', sInputStr) if isinstance(tmpValue, str) else \ @@ -416,7 +416,7 @@ def __updateAndReplaceNestedParam(self, oJson : dict, recursive : bool = False): def __tmpJsonUpdated(k, v, tmpJson, bNested): if bNested: if '[' in k: - sExec = k + " = \'" + v + "\'" if isinstance(v, str) else k + " = " + str(v) + sExec = k + " = \"" + v + "\"" if isinstance(v, str) else k + " = " + str(v) try: exec(sExec, globals()) except: