Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 4 additions & 9 deletions nipype/pipeline/engine/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -689,15 +689,10 @@
try:
output_value = func(first_arg, *list(args))
except NameError as e:
if e.args[0].startswith("global name") and e.args[0].endswith("is not defined"):
e.args = (
e.args[0],
(
"Due to engine constraints all imports have to be done "
"inside each function definition"
),
)
raise e
raise NameError(

Check warning on line 692 in nipype/pipeline/engine/utils.py

View check run for this annotation

Codecov / codecov/patch

nipype/pipeline/engine/utils.py#L692

Added line #L692 was not covered by tests
f"{e}: Due to engine constraints all imports have to be done inside each "
" function definition."
)
return output_value


Expand Down