Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions JsonPreprocessor/CJsonPreprocessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down Expand Up @@ -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:
Expand Down