File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 4
4
"""Provide a base interface to AFNI commands."""
5
5
import os
6
6
from sys import platform
7
- from distutils import spawn
7
+ import shutil
8
8
9
9
from ... import logging , LooseVersion
10
10
from ...utils .filemanip import split_filename , fname_presuffix
@@ -317,7 +317,7 @@ class AFNIPythonCommand(AFNICommand):
317
317
def cmd (self ):
318
318
"""Revise the command path."""
319
319
orig_cmd = super (AFNIPythonCommand , self ).cmd
320
- found = spawn . find_executable (orig_cmd )
320
+ found = shutil . which (orig_cmd )
321
321
return found if found is not None else orig_cmd
322
322
323
323
@property
Original file line number Diff line number Diff line change @@ -208,9 +208,9 @@ def _parse_inputs(self, skip=None):
208
208
skip = []
209
209
210
210
if not isdefined (self .inputs .in_config ):
211
- from distutils . spawn import find_executable
211
+ from shutil import which
212
212
213
- path = find_executable (self ._cmd )
213
+ path = which (self ._cmd )
214
214
if path is None :
215
215
path = os .getenv (MRTRIX3_HOME , "/opt/mrtrix3" )
216
216
else :
You can’t perform that action at this time.
0 commit comments