fix cascading memes
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Torma Kristóf 2021-04-25 18:25:27 +02:00
parent b6b3dd3a35
commit b70c214584
Signed by: tormakris
GPG Key ID: DC83C4F2C41B1047
2 changed files with 3 additions and 0 deletions

View File

@ -140,3 +140,4 @@ class NetWrapper:
return plaintext return plaintext
except Exception: except Exception:
print("Incorrect decryption") print("Incorrect decryption")
return "ERROR".encode('UTF-8')

View File

@ -40,6 +40,8 @@ class Server:
self.networkInstance.sendMessage("LINOK".encode('UTF-8')) self.networkInstance.sendMessage("LINOK".encode('UTF-8'))
elif command == "LINERROR": elif command == "LINERROR":
self.networkInstance.sendMessage("LINERROR".encode('UTF-8')) self.networkInstance.sendMessage("LINERROR".encode('UTF-8'))
elif command == "ERROR":
return None
parsedCommand = command.split(" ") parsedCommand = command.split(" ")
if len(parsedCommand) > 3: if len(parsedCommand) > 3:
self.networkInstance.sendMessage("ERROR".encode('UTF-8')) self.networkInstance.sendMessage("ERROR".encode('UTF-8'))