Skip to content

Commit eec510f

Browse files
committed
debugged setting of input value
1 parent f26225e commit eec510f

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

pydra/engine/specs.py

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -459,15 +459,12 @@ def collect_additional_outputs(self, inputs, output_dir, outputs):
459459
]:
460460
raise Exception("not implemented (collect_additional_output)")
461461
# assuming that field should have either default or metadata, but not both
462-
try:
463-
additional_out[fld.name] = getattr(inputs, fld.name)
464-
except AttributeError:
465-
pass
466-
else:
462+
input_value = getattr(inputs, fld.name, attr.NOTHING)
463+
if input_value is not attr.NOTHING:
467464
if fld.type in (File, MultiOutputFile, Directory, Path):
468-
additional_out[fld.name] = Path(additional_out[fld.name]).absolute()
469-
continue
470-
if (
465+
input_value = Path(input_value).absolute()
466+
additional_out[fld.name] = input_value
467+
elif (
471468
fld.default is None or fld.default == attr.NOTHING
472469
) and not fld.metadata: # TODO: is it right?
473470
raise AttributeError("File has to have default value or metadata")

0 commit comments

Comments
 (0)