Skip to content
Snippets Groups Projects
Commit d637644c authored by Alexander Schlemmer's avatar Alexander Schlemmer
Browse files

FIX(scanner): parameters can only be copied if present

parent 3b2ff777
No related branches found
No related tags found
2 merge requests!217TST: Make NamedTemporaryFiles Windows-compatible,!204Allow variable replacement in parameters of transformer functions
Pipeline #58275 passed
......@@ -576,16 +576,17 @@ class Converter(object, metaclass=ABCMeta):
" of the function!")
tr_func_key = list(tr_func_el.keys())[0]
# Create a copy of the function parameters:
tr_func_params = dict(tr_func_el[tr_func_key])
if tr_func_key not in transformer_functions:
raise RuntimeError("Unknown transformer function: {}".format(tr_func_key))
# Do variable replacment on function parameters:
if tr_func_params is not None:
if tr_func_el[tr_func_key] is not None:
# Create a copy of the function parameters:
tr_func_params = dict(tr_func_el[tr_func_key])
for key in tr_func_params:
tr_func_params[key] = replace_variables(tr_func_params[key], values)
else:
tr_func_params = None
# Retrieve the function from the dictionary:
tr_func = transformer_functions[tr_func_key]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment