From 3345af078040ae6c74693efb3e4b2966eb739bc2 Mon Sep 17 00:00:00 2001 From: Zhanglong Xia Date: Thu, 20 Jun 2024 07:41:09 +0800 Subject: [PATCH] [otci] fix the `setDaemon() is deprecated` warning (#10409) The otci reports warning `DeprecationWarning: setDaemon() is deprecated, set the daemon attribute instead`. This commit updates the otci to fix this warning. --- tools/otci/otci/command_handlers.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/otci/otci/command_handlers.py b/tools/otci/otci/command_handlers.py index f5f264c9d..ed08584c6 100644 --- a/tools/otci/otci/command_handlers.py +++ b/tools/otci/otci/command_handlers.py @@ -105,8 +105,7 @@ class OtCliCommandRunner(OTCommandHandler): self.__pending_lines = queue.Queue() self.__should_close = threading.Event() - self.__otcli_reader = threading.Thread(target=self.__otcli_read_routine) - self.__otcli_reader.setDaemon(True) + self.__otcli_reader = threading.Thread(target=self.__otcli_read_routine, daemon=True) self.__otcli_reader.start() def __repr__(self):