From a31810ab46e63e437d2492f906a9c763c494722c Mon Sep 17 00:00:00 2001 From: Firepup Sixfifty Date: Mon, 15 Jul 2024 23:37:15 +0000 Subject: [PATCH] del not .remove on dicts --- server.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server.py b/server.py index b667ff5..b085911 100644 --- a/server.py +++ b/server.py @@ -477,7 +477,7 @@ async def connectServer(hostname: str, port: int): G.msgs.append(log(f"{cName}'s server is going down")) G.clientsConnected.remove(cName.lower()) G.serverLinks -= 1 - G.servers.remove(rID) + del G.servers[rID] G.msgs.append(log(f"{rID} has de-linked from the network")) except (ConnectionResetError, BrokenPipeError, IndexError): for cName in G.servers[rID]: @@ -487,7 +487,7 @@ async def connectServer(hostname: str, port: int): except Exception: pass G.serverLinks -= 1 - G.servers.remove(rID) + del G.servers[rID] G.msgs.append(log(f"{rID} has de-linked from the network"))