Commit e849e144 authored by Paul McCarthy's avatar Paul McCarthy 🚵
Browse files

RF: make version parsing more lenient - will match any number of leading

dot-separated integers
parent 9545ba9b
......@@ -91,11 +91,18 @@ class Version(object):
strings are of the form W.X.Y.Z, where W, X, Y, and Z are all integers.
def __init__(self, verstr):
# The major/minor numbers of FSL versions
# change very infrequently for various
# reasons, so we accept a fourth "hotfix"
# number.
self.components = list(map(int, verstr.split('.')[:4]))
# Version identifiers for official FSL
# releases will have up to four
# components (X.Y.Z.W), but We accept
# any number of (integer) components,
# as internal releases may have more.
components = []
for comp in verstr.split('.'):
try: components.append(int(comp))
except Exception: break
self.components = components
self.verstr = verstr
def __str__(self):
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment