Skip to content

Commit 3777370

Browse files
committed
improved msg when AFNI is outdated
1 parent 31f5ecd commit 3777370

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

nipype/interfaces/afni/base.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,15 @@ def version():
4141
try:
4242
clout = CommandLine(command='afni_vcheck',
4343
terminal_output='allatonce').run()
44+
out = clout.runtime.stdout.split('\n')[1]
4445
except IOError:
4546
# If afni_vcheck is not present, return None
4647
warn('afni_vcheck executable not found.')
4748
return None
48-
49-
out = clout.runtime.stdout.split('\n')[1]
49+
except RuntimeError:
50+
# If AFNI is outdated, afni_vcheck throws error
51+
warn('AFNI is outdated')
52+
out = clout.runtime.stderr.split('\n')[1]
5053

5154
# Try to parse the version number
5255
m = re.search(r'[\.\d]*$', out)

0 commit comments

Comments
 (0)