Skip to content

Commit

Permalink
Merge pull request #815 from tomhampshire/main-exit-code
Browse files Browse the repository at this point in the history
Console script return status code (https://github.com/rordenlab/dcm2n…
  • Loading branch information
neurolabusc committed May 23, 2024
2 parents e2ead4b + 4de1d93 commit aea081a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dcm2niix/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ def main(args=None, **run_kwargs):
Arguments:
args: defaults to `sys.argv[1:]`.
**run_kwargs: passed to `subprocess.run`.
Returns: `subprocess.CompletedProcess` instance.
Returns: `int` exit code from dcm2niix execution.
"""
if args is None:
import sys
args = sys.argv[1:]
from subprocess import run
return run([bin] + args, **run_kwargs)
return run([bin] + args, **run_kwargs).returncode

0 comments on commit aea081a

Please sign in to comment.