diff --git a/bin/weewx/drivers/ws28xx.py b/bin/weewx/drivers/ws28xx.py index ffc6818a..cda6ad86 100644 --- a/bin/weewx/drivers/ws28xx.py +++ b/bin/weewx/drivers/ws28xx.py @@ -4081,7 +4081,7 @@ class CCommunicationService(object): self.running = False log.debug('stopRFThread: waiting for RF thread to terminate') self.child.join(self.thread_wait) - if self.child.isAlive(): + if self.child.is_alive(): log.error('unable to terminate RF thread after %d seconds' % self.thread_wait) else: diff --git a/bin/weewx/engine.py b/bin/weewx/engine.py index cbf2f1bc..c874877e 100644 --- a/bin/weewx/engine.py +++ b/bin/weewx/engine.py @@ -792,7 +792,7 @@ class StdReport(StdService): # Do not launch the reporting thread if an old one is still alive. # To guard against a zombie thread (alive, but doing nothing) launch # anyway if enough time has passed. - if self.thread and self.thread.isAlive(): + if self.thread and self.thread.is_alive(): thread_age = time.time() - self.launch_time if thread_age < self.max_wait: log.info("Launch of report thread aborted: existing report thread still running") @@ -816,7 +816,7 @@ class StdReport(StdService): if self.thread: log.info("Shutting down StdReport thread") self.thread.join(20.0) - if self.thread.isAlive(): + if self.thread.is_alive(): log.error("Unable to shut down StdReport thread") else: log.debug("StdReport thread has been terminated") diff --git a/bin/weewx/restx.py b/bin/weewx/restx.py index 2d582d3f..15487cde 100644 --- a/bin/weewx/restx.py +++ b/bin/weewx/restx.py @@ -148,12 +148,12 @@ class StdRESTful(weewx.engine.StdService): @staticmethod def shutDown_thread(q, t): """Function to shut down a thread.""" - if q and t.isAlive(): + if q and t.is_alive(): # Put a None in the queue to signal the thread to shutdown q.put(None) # Wait up to 20 seconds for the thread to exit: t.join(20.0) - if t.isAlive(): + if t.is_alive(): log.error("Unable to shut down %s thread", t.name) else: log.debug("Shut down %s thread.", t.name)