Skip to content

Commit f7ff56f

Browse files
0rC0effigies
authored andcommitted
[FIX] TypeError from 'v' of ANTs version string
Building ANTs from source code, actually the recommended procedure, leads to a version string with a leading `v` that causes the `TypeError`. This little fix may solve #3427
1 parent e31573b commit f7ff56f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

nipype/interfaces/ants/base.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ def parse_version(raw_info):
4242

4343
# -githash may or may not be appended
4444
v_string = v_string.split("-")[0]
45+
# if there is a 'v' at the beginning, it may be stripped
46+
v_string = v_string.lstrip('v')
4547

4648
# 2.2.0-equivalent version string
4749
if "post" in v_string and LooseVersion(v_string) >= LooseVersion(

0 commit comments

Comments
 (0)