mirror of
https://git.yoctoproject.org/poky
synced 2026-04-18 12:32:12 +02:00
bitbake: bitbake: fix deprecated threading.Thread.setDaemon
Deprecated in Python 3.10: https://docs.python.org/3/whatsnew/3.10.html#deprecated https://github.com/python/cpython/pull/25174 Fixes warnings like: ...bitbake/lib/bb/ui/uievent.py:68: DeprecationWarning: setDaemon() is deprecated, set the daemon attribute instead self.t.setDaemon(True) (Bitbake rev: 323f6ce27a1bfd7159e72f29684674ff495dedee) Signed-off-by: Tim Orling <tim.orling@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
ea12b673cf
commit
4d1675beac
@@ -177,7 +177,7 @@ class gtkthread(threading.Thread):
|
||||
quit = threading.Event()
|
||||
def __init__(self, shutdown):
|
||||
threading.Thread.__init__(self)
|
||||
self.setDaemon(True)
|
||||
self.daemon = True
|
||||
self.shutdown = shutdown
|
||||
if not Gtk.init_check()[0]:
|
||||
sys.stderr.write("Gtk+ init failed. Make sure DISPLAY variable is set.\n")
|
||||
|
||||
@@ -65,7 +65,7 @@ class BBUIEventQueue:
|
||||
self.server = server
|
||||
|
||||
self.t = threading.Thread()
|
||||
self.t.setDaemon(True)
|
||||
self.t.daemon = True
|
||||
self.t.run = self.startCallbackHandler
|
||||
self.t.start()
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ class Spinner(threading.Thread):
|
||||
""" A simple progress spinner to indicate download/parsing is happening"""
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(Spinner, self).__init__(*args, **kwargs)
|
||||
self.setDaemon(True)
|
||||
self.daemon = True
|
||||
self.signal = True
|
||||
|
||||
def run(self):
|
||||
|
||||
@@ -24,7 +24,7 @@ class KillRunbuilds(threading.Thread):
|
||||
""" Kill the runbuilds process after an amount of time """
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(KillRunbuilds, self).__init__(*args, **kwargs)
|
||||
self.setDaemon(True)
|
||||
self.daemon = True
|
||||
|
||||
def run(self):
|
||||
time.sleep(5)
|
||||
|
||||
Reference in New Issue
Block a user