[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.
This commit is contained in:
Zhanglong Xia
2024-06-19 16:41:09 -07:00
committed by GitHub
parent 4978e58e5c
commit 3345af0780
+1 -2
View File
@@ -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):