Skip to content

Commit 20d8f25

Browse files
committed
[FIX] read_crashfile stopped working after migration
Some minor fixes to get ``_read_txt`` to work again.
1 parent 3e19c35 commit 20d8f25

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

niworkflows/utils/misc.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,9 @@ def _read_txt(path):
7979
cur_key = ''
8080
cur_val = ''
8181
for i, line in enumerate(lines[5:]):
82+
if not line.strip():
83+
continue
84+
8285
if line[0].isspace():
8386
cur_val += line
8487
continue
@@ -95,7 +98,7 @@ def _read_txt(path):
9598
data['inputs'] = sorted(inputs)
9699
else:
97100
data['node_dir'] = "Node crashed before execution"
98-
data['traceback'] = ''.join(lines[traceback_start:]).strip()
101+
data['traceback'] = '\n'.join(lines[traceback_start:]).strip()
99102
return data
100103

101104

0 commit comments

Comments
 (0)