Skip to content

Commit f1b96c3

Browse files
committed
Merge pull request nipy#441 from akeshavan/fix/label2vol
fix to label2vol
2 parents 3db3bb2 + 9dad58b commit f1b96c3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

nipype/interfaces/freesurfer/model.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -756,7 +756,10 @@ def _list_outputs(self):
756756
if not isdefined(outfile):
757757
for key in ['label_file', 'annot_file', 'seg_file']:
758758
if isdefined(getattr(self.inputs,key)):
759-
_, src = os.path.split(getattr(self.inputs, key))
759+
path = getattr(self.inputs, key)
760+
if isinstance(path,list):
761+
path = path[0]
762+
_, src = os.path.split(path)
760763
if isdefined(self.inputs.aparc_aseg):
761764
src = 'aparc+aseg.mgz'
762765
outfile = fname_presuffix(src, suffix='_vol.nii.gz',

0 commit comments

Comments
 (0)