Skip to content

Commit 6b08c27

Browse files
committed
STY: Clean up FLIRT._parse_inputs
1 parent 100bb8e commit 6b08c27

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

nipype/interfaces/fsl/preprocess.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -561,17 +561,18 @@ def aggregate_outputs(self, runtime=None, needed_outputs=None):
561561
return outputs
562562

563563
def _parse_inputs(self, skip=None):
564-
skip = []
565-
if isdefined(self.inputs.save_log) and self.inputs.save_log:
566-
if not isdefined(self.inputs.verbose) or self.inputs.verbose == 0:
567-
self.inputs.verbose = 1
568-
if isdefined(self.inputs.apply_xfm) and self.inputs.apply_xfm:
569-
if not self.inputs.in_matrix_file and not self.inputs.uses_qform:
570-
raise RuntimeError('Argument apply_xfm requires in_matrix_file '
571-
'or uses_qform arguments to run')
564+
if skip is None:
565+
skip = []
566+
if self.inputs.save_log and not self.inputs.verbose:
567+
self.inputs.verbose = 1
568+
if self.inputs.apply_xfm and not (self.inputs.in_matrix_file or
569+
self.inputs.uses_qform):
570+
raise RuntimeError('Argument apply_xfm requires in_matrix_file or '
571+
'uses_qform arguments to run')
572572
skip.append('save_log')
573573
return super(FLIRT, self)._parse_inputs(skip=skip)
574574

575+
575576
class ApplyXFMInputSpec(FLIRTInputSpec):
576577
apply_xfm = traits.Bool(
577578
True, argstr='-applyxfm',

0 commit comments

Comments
 (0)