Simply version check util

This commit is contained in:
Et0h 2014-11-29 17:34:16 +00:00
parent c8e3426547
commit 6143786b74

View File

@ -213,9 +213,7 @@ def sameFileduration (duration1, duration2):
def meetsMinVersion(version, minVersion):
def versiontotuple(ver):
return tuple(map(int, ver.split(".")))
versionTuple = versiontotuple(version)
minVersionTuple = versiontotuple(minVersion)
return versionTuple >= minVersionTuple
return versiontotuple(version) >= versiontotuple(minVersion)
class RoomPasswordProvider(object):
CONTROLLED_ROOM_REGEX = re.compile("^\+(.*):(\w{12})$")