Skip to content

Commit

Permalink
[rqd] Replace isAlive with is_alive. (#1052)
Browse files Browse the repository at this point in the history
  • Loading branch information
splhack committed Oct 22, 2021
1 parent 4b156af commit fc0b509
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions rqd/rqd/rqcore.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ def runLinux(self):

frameInfo.pid = frameInfo.forkedCommand.pid

if not self.rqCore.updateRssThread.isAlive():
if not self.rqCore.updateRssThread.is_alive():
self.rqCore.updateRssThread = threading.Timer(rqd.rqconstants.RSS_UPDATE_INTERVAL,
self.rqCore.updateRss)
self.rqCore.updateRssThread.start()
Expand Down Expand Up @@ -356,7 +356,7 @@ def runWindows(self):

frameInfo.pid = frameInfo.forkedCommand.pid

if not self.rqCore.updateRssThread.isAlive():
if not self.rqCore.updateRssThread.is_alive():
self.rqCore.updateRssThread = threading.Timer(rqd.rqconstants.RSS_UPDATE_INTERVAL,
self.rqCore.updateRss)
self.rqCore.updateRssThread.start()
Expand Down Expand Up @@ -404,7 +404,7 @@ def runDarwin(self):

frameInfo.pid = frameInfo.forkedCommand.pid

if not self.rqCore.updateRssThread.isAlive():
if not self.rqCore.updateRssThread.is_alive():
self.rqCore.updateRssThread = threading.Timer(rqd.rqconstants.RSS_UPDATE_INTERVAL,
self.rqCore.updateRss)
self.rqCore.updateRssThread.start()
Expand Down
4 changes: 2 additions & 2 deletions rqd/rqd/rqnetwork.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,9 @@ def kill(self, message=""):
if self.frameAttendantThread is None:
log.warning(
"Kill requested before frameAttendantThread is created for: %s", self.frameId)
elif self.frameAttendantThread.isAlive() and self.pid is None:
elif self.frameAttendantThread.is_alive() and self.pid is None:
log.warning("Kill requested before pid is available for: %s", self.frameId)
elif self.frameAttendantThread.isAlive():
elif self.frameAttendantThread.is_alive():
# pylint: disable=broad-except
try:
if not self.killMessage and message:
Expand Down
4 changes: 2 additions & 2 deletions rqd/tests/rqcore_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ def test_deleteFrame(self):

def test_killAllFrame(self):
frameAttendantThread = mock.MagicMock()
frameAttendantThread.isAlive.return_value = False
frameAttendantThread.is_alive.return_value = False
frame1Id = 'frame1'
frame2Id = 'frame2'
frame3Id = 'frame3'
Expand All @@ -230,7 +230,7 @@ def test_killAllFrame(self):

def test_killAllFrameIgnoreNimby(self):
frameAttendantThread = mock.MagicMock()
frameAttendantThread.isAlive.return_value = False
frameAttendantThread.is_alive.return_value = False
frame1Id = 'frame1'
frame2Id = 'frame2'
frame1 = rqd.rqnetwork.RunningFrame(
Expand Down

0 comments on commit fc0b509

Please sign in to comment.