summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Natsume <takanattie@gmail.com>2022-08-21 21:07:52 +0900
committerTakashi Natsume <takanattie@gmail.com>2022-08-21 21:16:07 +0900
commit1b08481491624dbaa90b59c34b2c29d47f006346 (patch)
treeec21d800b94dee30b0fa5b1109ac2056ca25990b
parentcb60c1d2facde2f318ec30c8b9cf63844eaccf92 (diff)
downloadglance-1b08481491624dbaa90b59c34b2c29d47f006346.tar.gz
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 <takanattie@gmail.com>
-rw-r--r--glance/api/v2/cached_images.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/glance/api/v2/cached_images.py b/glance/api/v2/cached_images.py
index b0409dcb5..3c4bb2a2f 100644
--- a/glance/api/v2/cached_images.py
+++ b/glance/api/v2/cached_images.py
@@ -257,7 +257,7 @@ class CacheWorker(threading.Thread):
# NOTE(abhishekk): Setting daemon to True because if `atexit` event
# handler is not called due to some reason the main process will
# not hang for the thread which will never exit.
- self.setDaemon(True)
+ self.daemon = True
def submit(self, job):
self.q.put(job)