Skip to content

Commit 9e57827

Browse files
jadeccieffigies
andauthored
Simplify fix for Tkregister2._format_arg
Co-authored-by: Chris Markiewicz <effigies@gmail.com>
1 parent bf4bdcb commit 9e57827

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

nipype/interfaces/freesurfer/utils.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1967,14 +1967,8 @@ def _format_arg(self, name, spec, value):
19671967
if name == "lta_in" and self.inputs.invert_lta_in:
19681968
spec = "--lta-inv %s"
19691969
if name in ("fsl_out", "lta_out") and value is True:
1970-
if name == 'fsl_out':
1971-
name_actual = 'fsl_file'
1972-
if name == 'lta_out':
1973-
name_actual = 'lta_file'
1974-
value = self._list_outputs()[name_actual]
1975-
return super(Tkregister2, self)._format_arg(name_actual, spec, value)
1976-
else:
1977-
return super(Tkregister2, self)._format_arg(name, spec, value)
1970+
value = self._list_outputs()[f'{name[:3]}_file']
1971+
return super()._format_arg(name, spec, value)
19781972

19791973
def _list_outputs(self):
19801974
outputs = self._outputs().get()

0 commit comments

Comments
 (0)