From 1c039389f287115c2930f03fa4b22440730571bb Mon Sep 17 00:00:00 2001 From: rprinz08 Date: Sat, 7 Nov 2020 11:13:51 +0100 Subject: [PATCH] Fix check for wrong named attributes --- litex/tools/remote/comm_udp.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/litex/tools/remote/comm_udp.py b/litex/tools/remote/comm_udp.py index 9035de842..cd2f98871 100644 --- a/litex/tools/remote/comm_udp.py +++ b/litex/tools/remote/comm_udp.py @@ -18,13 +18,13 @@ class CommUDP: self.debug = debug def open(self): - if hasattr(self, "tx_socket"): + if hasattr(self, "socket"): return self.socket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) self.socket.bind(("", self.port)) def close(self): - if not hasattr(self, "tx_socket"): + if not hasattr(self, "socket"): return self.socket.close() del self.socket