From 60d9a635ce833d22dba105f113e0828eb969c411 Mon Sep 17 00:00:00 2001 From: Andrew Dennison Date: Mon, 19 Feb 2024 14:32:54 +1100 Subject: [PATCH] tools/litex_term: fix DeprecationWarning litex/litex/tools/litex_term.py:557: DeprecationWarning: setDaemon() is deprecated, set the daemon attribute instead self.reader_thread.setDaemon(True) litex/litex/tools/litex_term.py:586: DeprecationWarning: setDaemon() is deprecated, set the daemon attribute instead self.writer_thread.setDaemon(True) --- litex/tools/litex_term.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/litex/tools/litex_term.py b/litex/tools/litex_term.py index 3d1d59b0c..4dfac7d5c 100755 --- a/litex/tools/litex_term.py +++ b/litex/tools/litex_term.py @@ -553,8 +553,7 @@ class LiteXTerm: def start_reader(self): self.reader_alive = True - self.reader_thread = threading.Thread(target=self.reader) - self.reader_thread.setDaemon(True) + self.reader_thread = threading.Thread(target=self.reader, daemon=True) self.reader_thread.start() def stop_reader(self): @@ -582,8 +581,7 @@ class LiteXTerm: def start_writer(self): self.writer_alive = True - self.writer_thread = threading.Thread(target=self.writer) - self.writer_thread.setDaemon(True) + self.writer_thread = threading.Thread(target=self.writer, daemon=True) self.writer_thread.start() def stop_writer(self):