From f4fde38a13e3769c14e69efe3cc6b06a47fa3728 Mon Sep 17 00:00:00 2001 From: Richard Neumann Date: Sun, 21 Aug 2022 15:08:52 +0200 Subject: [PATCH] Use assignment operator --- rcon/source/client.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/rcon/source/client.py b/rcon/source/client.py index a4dc43f..30ad921 100644 --- a/rcon/source/client.py +++ b/rcon/source/client.py @@ -35,9 +35,8 @@ class Client(BaseClient, socket_type=SOCK_STREAM): def communicate(self, packet: Packet) -> Packet: """Send and receive a packet.""" self.send(packet) - response = self.read() - if len(response.payload) < self.frag_threshold: + if len((response := self.read()).payload) < self.frag_threshold: return response self.send(Packet.make_command(self.frag_detect_cmd))