diff --git a/dcm2niix/__init__.py b/dcm2niix/__init__.py index 91b1cb1c..42b26c2d 100644 --- a/dcm2niix/__init__.py +++ b/dcm2niix/__init__.py @@ -24,10 +24,10 @@ def main(args=None, **run_kwargs): Arguments: args: defaults to `sys.argv[1:]`. **run_kwargs: passed to `subprocess.run`. - Returns: `int` exit code from dcm2niix execution. + Returns: `subprocess.CompletedProcess` instance. """ if args is None: import sys args = sys.argv[1:] from subprocess import run - return run([bin] + args, **run_kwargs).returncode + return run([bin] + args, **run_kwargs)