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

Merge branch 'f-transformer-replace-variables' into ruqad

parents 3902f7b9 d637644c
No related branches found
No related tags found
1 merge request!217TST: Make NamedTemporaryFiles Windows-compatible
...@@ -576,16 +576,17 @@ class Converter(object, metaclass=ABCMeta): ...@@ -576,16 +576,17 @@ class Converter(object, metaclass=ABCMeta):
" of the function!") " of the function!")
tr_func_key = list(tr_func_el.keys())[0] 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: if tr_func_key not in transformer_functions:
raise RuntimeError("Unknown transformer function: {}".format(tr_func_key)) raise RuntimeError("Unknown transformer function: {}".format(tr_func_key))
# Do variable replacment on function parameters: # 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: for key in tr_func_params:
tr_func_params[key] = replace_variables(tr_func_params[key], values) tr_func_params[key] = replace_variables(tr_func_params[key], values)
else:
tr_func_params = None
# Retrieve the function from the dictionary: # Retrieve the function from the dictionary:
tr_func = transformer_functions[tr_func_key] tr_func = transformer_functions[tr_func_key]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment