Fix a deprecation warning about threading.Thread
Fix the following deprecation warning. * DeprecationWarning: setDaemon() is deprecated, set the daemon attribute instead Change-Id: I208bd1bef002ce91e57798f3475bbe64d3b81329 Closes-Bug: 1987191 Signed-off-by: Takashi Natsume <takanattie@gmail.com>
This commit is contained in:
@@ -46,7 +46,7 @@ class SerialProxy(threading.Thread):
|
||||
def __init__(self, instance_name, addr, port, input_queue,
|
||||
output_queue, client_connected):
|
||||
super(SerialProxy, self).__init__()
|
||||
self.setDaemon(True)
|
||||
self.daemon = True
|
||||
|
||||
self._instance_name = instance_name
|
||||
self._addr = addr
|
||||
@@ -99,7 +99,7 @@ class SerialProxy(threading.Thread):
|
||||
workers = []
|
||||
for job in [self._get_data, self._send_data]:
|
||||
worker = threading.Thread(target=job)
|
||||
worker.setDaemon(True)
|
||||
worker.daemon = True
|
||||
worker.start()
|
||||
workers.append(worker)
|
||||
|
||||
|
||||
@@ -490,7 +490,7 @@ class Host(object):
|
||||
LOG.debug("Starting native event thread")
|
||||
self._event_thread = native_threading.Thread(
|
||||
target=self._native_thread)
|
||||
self._event_thread.setDaemon(True)
|
||||
self._event_thread.daemon = True
|
||||
self._event_thread.start()
|
||||
|
||||
LOG.debug("Starting green dispatch thread")
|
||||
|
||||
Reference in New Issue
Block a user