Skip to content

Commit

Permalink
virt: replace is_alive with isAlive as commit d03dd090
Browse files Browse the repository at this point in the history
Check the whole autotest repo by grep, fix rest problem.

threading.is_alive is only available starting with Python 2.6.

Signed-off-by: Amos Kong <[email protected]>
  • Loading branch information
amoskong committed Mar 6, 2012
1 parent 1c3b9f9 commit e7f04dd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions kvm/tests/virtio_console.py
Original file line number Diff line number Diff line change
Expand Up @@ -1359,15 +1359,15 @@ def __tmigrate(vm, consoles, parms, offline=True):
tmp[:-2])
i+=1
time.sleep(2)
if not threads[0].is_alive():
if not threads[0].isAlive():
if exit_event.isSet():
raise error.TestFail("Exit event emited, check the log for"
"send/recv thread failure.")
else:
raise error.TestFail("Send thread died unexpectedly in "
"migration %d", (j+1))
for i in range(0, len(recv_pts)):
if not threads[i+1].is_alive():
if not threads[i+1].isAlive():
raise error.TestFail("Recv thread %d died unexpectedly in "
"migration %d", i, (j+1))
if verified[i] == threads[i+1].idx:
Expand All @@ -1382,7 +1382,7 @@ def __tmigrate(vm, consoles, parms, offline=True):
exit_event.set()
# Send thread might fail to exit when the guest stucks
i = 30
while threads[0].is_alive():
while threads[0].isAlive():
if i <= 0:
raise error.TestFail("Send thread did not finish")
time.sleep(1)
Expand Down

0 comments on commit e7f04dd

Please sign in to comment.