From de9ed1f3dba34d641c354bdb070232887254b142 Mon Sep 17 00:00:00 2001 From: Unai Martinez-Corral Date: Tue, 30 Aug 2022 01:05:50 +0200 Subject: [PATCH] f4pga/flows/common_modules/generic_script_wrapper: support script params of type list Signed-off-by: Unai Martinez-Corral --- f4pga/flows/common_modules/generic_script_wrapper.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/f4pga/flows/common_modules/generic_script_wrapper.py b/f4pga/flows/common_modules/generic_script_wrapper.py index cd9b104..62baeaa 100644 --- a/f4pga/flows/common_modules/generic_script_wrapper.py +++ b/f4pga/flows/common_modules/generic_script_wrapper.py @@ -156,9 +156,15 @@ class GenericScriptWrapperModule(Module): cwd = ctx.r_env.resolve(self.cwd) - sub_args = [ctx.r_env.resolve(self.script_path, final=True)] + self.get_args(ctx) - if self.interpreter: - sub_args = [ctx.r_env.resolve(self.interpreter, final=True)] + sub_args + sub_args = ( + ([ctx.r_env.resolve(self.interpreter, final=True)] if self.interpreter else []) + + ( + self.script_path + if isinstance(self.script_path, list) + else [ctx.r_env.resolve(self.script_path, final=True)] + ) + + self.get_args(ctx) + ) sub_env = self.get_env(ctx)