Skip to content

Commit

Permalink
fix optional parameter executable which was not optional
Browse files Browse the repository at this point in the history
  • Loading branch information
denisri committed Dec 6, 2023
1 parent f62ba7e commit 4d68352
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion capsul/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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

0 comments on commit 4d68352

Please sign in to comment.