Skip to content

Commit 1b08481

Browse files
committed
Fix a deprecation warning about threading.Thread
Fix the following deprecation warning. * DeprecationWarning: setDaemon() is deprecated, set the daemon attribute instead Change-Id: I7af41eddf597e1ac78e8835a5af2e029d65a302a Closes-Bug: 1987191 Signed-off-by: Takashi Natsume <[email protected]>
1 parent cb60c1d commit 1b08481

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

glance/api/v2/cached_images.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ def __init__(self, *args, **kwargs):
257257
# NOTE(abhishekk): Setting daemon to True because if `atexit` event
258258
# handler is not called due to some reason the main process will
259259
# not hang for the thread which will never exit.
260-
self.setDaemon(True)
260+
self.daemon = True
261261

262262
def submit(self, job):
263263
self.q.put(job)

0 commit comments

Comments
 (0)