summaryrefslogtreecommitdiff
path: root/odoo
diff options
context:
space:
mode:
authorXavier Morel <xmo@odoo.com>2020-10-16 13:58:26 +0000
committerXavier Morel <xmo@odoo.com>2020-11-27 10:00:42 +0000
commitc4a94bc99285aba085badeb1a41e8fe04562ef50 (patch)
treef55460149ebc0644e409cbadd5515f6a2a34e5a8 /odoo
parentaa4be1c39d246a1a48c40bf7717c23809ca2e7ef (diff)
[FIX] core: Thread.isAlive -> Thread.is_alive
Old naming has been deprecated for a long time, it's been removed entirely in 3.9 (bpo-37804).
Diffstat (limited to 'odoo')
-rw-r--r--odoo/service/server.py4
1 files changed, 2 insertions, 2 deletions
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