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):
Return True if the current project file format is
After Change
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