Skip to content

Commit c3d55a7

Browse files
authored
Merge pull request redhat-imaging#442 from mnk/master
Replaced Thread.isAlive with Thread.is_alive
2 parents a49d087 + bf5ddca commit c3d55a7

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

imagefactory

+1-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ class Application(Singleton):
122122
for builder_id in builder_dict:
123123
# If the build or push worker thread has already exited we do nothing
124124
# builder classes should always cleanup before exiting the thread-starting methods
125-
if builder_dict[builder_id].builder_thread and builder_dict[builder_id].builder_thread.isAlive():
125+
if builder_dict[builder_id].builder_thread and builder_dict[builder_id].builder_thread.is_alive():
126126
try:
127127
logging.debug("Executing abort method for builder id (%s)" % (builder_id))
128128
builder_dict[builder_id].abort()

imagefactory_plugins/Docker/Docker.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ def _run_guestmount(g):
366366
self.log.error("WARNING: Could not unmount guest at (%s) - may still be mounted" % (tempdir) )
367367
if fuse_thread:
368368
fuse_thread.join(30.0)
369-
if fuse_thread.isAlive():
369+
if fuse_thread.is_alive():
370370
self.log.error("Guestfs local mount thread is still active - FUSE filesystem still mounted at (%s)" % (tempdir) )
371371

372372
if wrap_metadata:

imagefactoryd

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ class Application(Singleton):
9494
for builder_id in builder_dict:
9595
# If the build or push worker thread has already exited we do nothing
9696
# builder classes should always cleanup before exiting the thread-starting methods
97-
if builder_dict[builder_id].builder_thread and builder_dict[builder_id].builder_thread.isAlive():
97+
if builder_dict[builder_id].builder_thread and builder_dict[builder_id].builder_thread.is_alive():
9898
try:
9999
logging.debug("Executing abort method for builder id (%s)" % (builder_id))
100100
builder_dict[builder_id].abort()

tests/testReservationManager.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ def testJobQueue(self):
140140
for job in job_threads:
141141
job.start()
142142
for job in job_threads:
143-
if job.isAlive():
143+
if job.is_alive():
144144
job.join()
145145
#self.log.info(job_output)
146146
self.assertEqual((3 * job_number * len(ReservationManager().queues)), len(job_output))

0 commit comments

Comments
 (0)