Skip to content

Commit 171c487

Browse files
committed
FIX: Do nothing if no text is present
1 parent d5e0a51 commit 171c487

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

nipype/pipeline/engine/nodes.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -752,10 +752,11 @@ def _run_command(self, execute, copyfiles=True):
752752
if exc_tb:
753753
runtime = result.runtime
754754

755-
def _tab(field):
755+
def _tab(text):
756756
from textwrap import indent
757-
758-
return indent(field, '\t')
757+
if not text:
758+
return ""
759+
return indent(text, '\t')
759760

760761
msg = f"Exception raised while executing Node {self.name}.\n\n"
761762
if hasattr(runtime, 'cmdline'):

0 commit comments

Comments
 (0)