From a14760f459929b7d3a6008cbc237b8c394132dc6 Mon Sep 17 00:00:00 2001 From: Sebastian Majewski Date: Mon, 9 Sep 2024 23:47:38 -0500 Subject: [PATCH] Code cleanup --- pytcp/protocols/udp/udp__packet_handler_rx.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pytcp/protocols/udp/udp__packet_handler_rx.py b/pytcp/protocols/udp/udp__packet_handler_rx.py index b2694244..ffe463c8 100755 --- a/pytcp/protocols/udp/udp__packet_handler_rx.py +++ b/pytcp/protocols/udp/udp__packet_handler_rx.py @@ -140,8 +140,7 @@ def _phrx_udp(self, packet_rx: PacketRx, /) -> None: ) for socket_pattern in packet_rx_md.socket_patterns: - socket = stack.sockets.get(socket_pattern, None) - if socket: + if socket := stack.sockets.get(socket_pattern, None): self.packet_stats_rx.udp__socket_match += 1 __debug__ and log( "udp",