Skip to content
Snippets Groups Projects
Commit 12e9b081 authored by Taylor Hanayik's avatar Taylor Hanayik Committed by Paul McCarthy
Browse files

ENH: update fslversion call for the future :hash version

parent 430bba8b
No related branches found
No related tags found
No related merge requests found
......@@ -2,4 +2,5 @@ Paul McCarthy <pauldmccarthy@gmail.com>
Michiel Cottaar <michiel.cottaar@ndcn.ox.ac.uk>
Matthew Webster <matthew.webster@ndcn.ox.ac.uk>
Sean Fitzgibbon <sean.fitzgibbon@ndcn.ox.ac.uk>
Martin Craig <martin.craig@eng.ox.ac.uk>
\ No newline at end of file
Martin Craig <martin.craig@eng.ox.ac.uk>
Taylor Hanayik <taylor.hanayik@ndcn.ox.ac.uk>
\ No newline at end of file
......@@ -287,7 +287,10 @@ class Platform(notifier.Notifier):
if op.exists(versionFile):
with open(versionFile, 'rt') as f:
self.__fslVersion = f.read().strip()
# split string at colon for new hash style versions
# first object in list is the non-hashed version string (e.g. 6.0.2)
# if no ":hash:" then standard FSL version string is still returned
self.__fslVersion = f.read().strip().split(":")[0]
self.notify(value=value)
......
......@@ -161,7 +161,7 @@ def test_fsldir():
def makeFSL():
os.makedirs(op.join(fsldir, 'etc'))
with open(op.join(fsldir, 'etc', 'fslversion'), 'wt') as f:
f.write('Dummy FSL\n')
f.write('6.0.2:7606e0d8\n')
try:
......@@ -182,7 +182,7 @@ def test_fsldir():
assert os.environ['FSLDIR'] == fsldir
assert newFSLDir[0] == fsldir
assert p.fsldir == fsldir
assert p.fslVersion == 'Dummy FSL'
assert p.fslVersion == '6.0.2'
finally:
shutil.rmtree(testdir)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment