From 4e5634eb1db3b475c26c78693ffe2796ca407d07 Mon Sep 17 00:00:00 2001 From: Attila Szigeti Date: Sun, 25 Apr 2021 18:29:49 +0200 Subject: [PATCH] DNL --- server/server.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/server/server.py b/server/server.py index 812aab1..c1f8a28 100644 --- a/server/server.py +++ b/server/server.py @@ -105,13 +105,12 @@ class Server: if secondParam != "": self.networkInstance.sendMessage("ERROR".encode('UTF-8')) else: - # TODO - # Megkapod a filenevet arguemntumkent - # Kuldeni kell egy uzenetet, ami a falj tartalma - # Kuldeni kell egy uzenetet, ami EOF - # Mindig minden legyen UTF-8-kent kodolva, kiveve a falj, az marard - # Ha sikeres, OK valaszt megkapod, kulonben ERROR valaszt megkapod - pass + try: + file = self.executor.getFileInCurrentDirectory(firstParam) + self.networkInstance.sendMessage(file) + self.networkInstance.sendMessage("OK".encode('UTF-8')) + except: + self.networkInstance.sendMessage("ERROR".encode('UTF-8')) else: self.networkInstance.sendMessage("ERROR".encode('UTF-8'))