def convertVersion(vstring):
if not isinstance(vstring, str):
raise Exception("tried to convert non-string version: {}".format(vstring))
return tuple(int(i)for i in vstring.split("."))
def isVersionCompatible(version):
After Change
// is simply converted to the integer 5 for compatibility purposes.
int_tuple = ()
for i in vstring.split("."):
m = re.search("(\d+)", i)
assert bool(m), "Don"t understand version component: {}".format( i )
next_int = int(m.groups()[0])
int_tuple = int_tuple + (next_int,)
return int_tuple