Skip to content
Snippets Groups Projects
Commit f2dbc450 authored by David Hendriks's avatar David Hendriks
Browse files

updated run system function to handle the special arguments that end with %d as well

parent 5eb3f709
No related branches found
No related tags found
No related merge requests found
Pipeline #32159 passed
......@@ -51,6 +51,7 @@ def run_system(**kwargs):
# Load available arg keywords
available_binary_c_arg_keywords = get_arg_keys()
special_keywords = [el for el in list(available_binary_c_arg_keywords) if el.endswith("%d")]
other_keywords = ["custom_logging_code", "log_filename", "parse_function"]
......@@ -66,6 +67,16 @@ def run_system(**kwargs):
if key in available_binary_c_arg_keywords:
binary_c_args[key] = kwargs[key]
elif any(
[
True
if (key.startswith(param[:-2]) and len(param[:-2]) < len(key))
else False
for param in special_keywords
]
):
binary_c_args[key] = kwargs[key]
# Notify user when this key wont be used
else:
if not key in other_keywords:
......
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