From 4d68352c68b12794ae3ecf28038d73f1fdeb7b5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Denis=20Rivi=C3=A8re?= Date: Wed, 6 Dec 2023 11:15:28 +0100 Subject: [PATCH] fix optional parameter executable which was not optional --- capsul/dataset.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/capsul/dataset.py b/capsul/dataset.py index a2150ed4..c128b024 100644 --- a/capsul/dataset.py +++ b/capsul/dataset.py @@ -1223,6 +1223,8 @@ def generate_paths(self, executable=None): Generate all paths for parameters of the given executable. Completion rules will apply using the current values of the metadata. """ + if executable is None: + executable = self.executable() for parameter, value in self.path_for_parameters(executable).items(): # self.dprint(f"Set {executable.name}.{parameter} = {value}") setattr(executable, parameter, value) @@ -1400,6 +1402,6 @@ def path_for_parameters(self, executable, parameters=None): # print(f"!set! {executable.name}.{parameter} = {repr(path)}") result[parameter] = path except Exception as e: + self.dprint(" Error:", e) pass - # self.dprint(" Error:", e) return result