Skip to content

Commit 61cc7a9

Browse files
committed
Update version check
1 parent 5500598 commit 61cc7a9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

nipype/interfaces/ants/base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,13 @@ def version(self):
4848

4949
for line in res.splitlines():
5050
if line.startswith('ANTs Version: '):
51-
v_string = line.split()[2]
51+
v_string, githash = line.split()[2].split('-')
5252
break
5353
else:
5454
return None
5555

5656
# 2.2.0-equivalent version string
57-
if LooseVersion(v_string) >= LooseVersion('2.1.0.post789-g0740f'):
57+
if 'post' in v_string and LooseVersion(v_string) >= LooseVersion('2.1.0.post789'):
5858
self._version = '2.2.0'
5959
else:
6060
self._version = '.'.join(v_string.split('.')[:3])

0 commit comments

Comments
 (0)