diff --git a/syncplay/client.py b/syncplay/client.py index 0a380ce..4ff1080 100644 --- a/syncplay/client.py +++ b/syncplay/client.py @@ -58,7 +58,7 @@ class SyncClientProtocol(CommandProtocol): def handle_connected_state(self, args): args = self.__parseState(args) if not args: - self.drop_with_error('Malformed state attributes') + self.dropWithError('Malformed state attributes') return counter, ctime, paused, position, name = args @@ -72,7 +72,7 @@ class SyncClientProtocol(CommandProtocol): ctime = int(ctime) position = int(position) except ValueError: - self.drop_with_error('Invalid arguments') + self.dropWithError('Invalid arguments') ctime /= 1000.0 position /= 1000.0 diff --git a/syncplay/network_utils.py b/syncplay/network_utils.py index cc1053a..87ad9db 100644 --- a/syncplay/network_utils.py +++ b/syncplay/network_utils.py @@ -42,7 +42,7 @@ class CommandProtocol(LineReceiver): args = ArgumentParser.splitArguments(line) if not args: - self.drop_with_error('Malformed line') + self.dropWithError('Malformed line') return command = args.pop(0) #if command not in ['ping', 'pong']: @@ -56,7 +56,7 @@ class CommandProtocol(LineReceiver): if handler: handler = getattr(self, handler, None) if not handler: - self.drop_with_error('Unknown command: `%s`' % command) + self.dropWithError('Unknown command: `%s`' % command) return # TODO log it too handler(args) @@ -77,7 +77,7 @@ class CommandProtocol(LineReceiver): def drop(self): self.transport.loseConnection() - def drop_with_error(self, error): + def dropWithError(self, error): self.send_message('error', error) self.drop()