From 0b6b73eba74d004645890f6df97c9200f9cca912 Mon Sep 17 00:00:00 2001 From: Uriziel Date: Mon, 15 Oct 2012 20:43:33 +0200 Subject: [PATCH] Version check only checks major release --- syncplay/protocols.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/syncplay/protocols.py b/syncplay/protocols.py index 8c9cf04..6e7e6bb 100644 --- a/syncplay/protocols.py +++ b/syncplay/protocols.py @@ -82,7 +82,7 @@ class SyncClientProtocol(JSONCommandProtocol): username, roomName, version = self._extractHelloArguments(hello) if(not username or not roomName or not version): self.dropWithError("Not enough Hello arguments") - elif(version <> syncplay.version): #TODO: change to check only subversion + elif(version.split(".")[0:2] != syncplay.version.split(".")[0:2]): self.dropWithError("Mismatch between versions of client and server") else: self._client.setUsername(username) @@ -266,7 +266,7 @@ class SyncServerProtocol(JSONCommandProtocol): username, serverPassword, roomName, roomPassword, version = self._extractHelloArguments(hello) if(not username or not roomName or not version): self.dropWithError("Not enough Hello arguments") - elif(version <> syncplay.version): #TODO: change to check only major release + elif(version.split(".")[0:2] != syncplay.version.split(".")[0:2]): self.dropWithError("Mismatch between versions of client and server") else: if(not self._checkPassword(serverPassword)):