summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--addons/hw_escpos/controllers/main.py2
-rw-r--r--odoo/service/server.py4
2 files changed, 3 insertions, 3 deletions
diff --git a/addons/hw_escpos/controllers/main.py b/addons/hw_escpos/controllers/main.py
index 123a8a41cec..b1a015763f9 100644
--- a/addons/hw_escpos/controllers/main.py
+++ b/addons/hw_escpos/controllers/main.py
@@ -92,7 +92,7 @@ class EscposDriver(Thread):
def lockedstart(self):
with self.lock:
- if not self.isAlive():
+ if not self.is_alive():
self.daemon = True
self.start()
diff --git a/odoo/service/server.py b/odoo/service/server.py
index 4cd650cb0bb..cff0a3f8896 100644
--- a/odoo/service/server.py
+++ b/odoo/service/server.py
@@ -391,7 +391,7 @@ class ThreadedServer(CommonServer):
# e.g. threads that exceeded their real time,
# but which finished before the server could restart.
for thread in list(self.limits_reached_threads):
- if not thread.isAlive():
+ if not thread.is_alive():
self.limits_reached_threads.remove(thread)
if self.limits_reached_threads:
self.limit_reached_time = self.limit_reached_time or time.time()
@@ -489,7 +489,7 @@ class ThreadedServer(CommonServer):
_logger.debug('process %r (%r)', thread, thread.isDaemon())
if (thread != me and not thread.isDaemon() and thread.ident != self.main_thread_id and
thread not in self.limits_reached_threads):
- while thread.isAlive() and (time.time() - stop_time) < 1:
+ while thread.is_alive() and (time.time() - stop_time) < 1:
# We wait for requests to finish, up to 1 second.
_logger.debug('join and sleep')
# Need a busyloop here as thread.join() masks signals