Skip to content

Commit

Permalink
dcm2niix - Do consider exit 1 to be an error
Browse files Browse the repository at this point in the history
Based on information in
https://github.com/nipy/nipype/blob/ca27e5187e3c12be5b5565c73be40f7ae70c1689/nipype/interfaces/dcm2nii.py#L449-L450

> Exit code 0 is for success, exit code 1 is the undefined error.

Handling of exit 1 as successful was added in 6ecd4a9
AKA 1.0.2~2^2~13
  • Loading branch information
yarikoptic committed Jul 25, 2023
1 parent ca27e51 commit 6e40ed9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions nipype/interfaces/dcm2nii.py
Original file line number Diff line number Diff line change
Expand Up @@ -446,8 +446,7 @@ def _format_arg(self, opt, spec, val):
return super()._format_arg(opt, spec, val)

def _run_interface(self, runtime):
# may use return code 1 despite conversion
runtime = super()._run_interface(runtime, correct_return_codes=(0, 1))
runtime = super()._run_interface(runtime)
self._parse_files(self._parse_stdout(runtime.stdout))
return runtime

Expand Down

0 comments on commit 6e40ed9

Please sign in to comment.