diff --git a/server/server.py b/server/server.py index 00e9ae3..414f5e2 100644 --- a/server/server.py +++ b/server/server.py @@ -40,13 +40,12 @@ class Server: parsedCommand = command.split(" ") if len(parsedCommand) > 3: self.networkInstance.sendMessage("ERROR".encode('UTF-8')) - # TODO: Ez igy gecironda, ezt meg kene csinalni rendesen. elif len(parsedCommand) == 1: - return self.execute(parsedCommand[0]) + self.execute(parsedCommand[0]) elif len(parsedCommand) == 2: - return self.execute(parsedCommand[0], parsedCommand[1]) + self.execute(parsedCommand[0], parsedCommand[1]) elif len(parsedCommand) == 3: - return self.execute(parsedCommand[0], parsedCommand[1], parsedCommand[2]) + self.execute(parsedCommand[0], parsedCommand[1], parsedCommand[2]) def execute(self, command: str, firstParam: str = "", secondParam: str = "") -> None: if self.executor.baseDir == "": @@ -121,4 +120,5 @@ class Server: message = self.networkInstance.recieveMessage().decode('UTF-8') self.parseCommand(message) except Exception as e: + self.networkInstance.sendMessage("ERROR".encode('UTF-8')) print(e)