From 1a7ae9ecc69bb43732713ae6f4c9901e459cd99b Mon Sep 17 00:00:00 2001 From: w1kl4s Date: Wed, 14 Oct 2020 18:07:29 +0200 Subject: [PATCH] Fix Python 3.9 compatibility Replaced threading.Thread.isAlive() with threading.Thread.is_alive() --- bumblebee_status/core/module.py | 2 +- bumblebee_status/modules/contrib/apt.py | 2 +- bumblebee_status/modules/core/redshift.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bumblebee_status/core/module.py b/bumblebee_status/core/module.py index 23ea4b5..f4bac7e 100644 --- a/bumblebee_status/core/module.py +++ b/bumblebee_status/core/module.py @@ -123,7 +123,7 @@ class Module(core.input.Object): def update_wrapper(self): if self.background == True: - if self.__thread and self.__thread.isAlive(): + if self.__thread and self.__thread.is_alive(): return # skip this update interval self.__thread = threading.Thread(target=self.internal_update, args=(True,)) self.__thread.start() diff --git a/bumblebee_status/modules/contrib/apt.py b/bumblebee_status/modules/contrib/apt.py index 2a41aea..b7200bb 100644 --- a/bumblebee_status/modules/contrib/apt.py +++ b/bumblebee_status/modules/contrib/apt.py @@ -65,7 +65,7 @@ class Module(core.module.Module): ) def update(self): - if self.__thread and self.__thread.isAlive(): + if self.__thread and self.__thread.is_alive(): return self.__thread = threading.Thread(target=get_apt_check_info, args=(self,)) diff --git a/bumblebee_status/modules/core/redshift.py b/bumblebee_status/modules/core/redshift.py index c60ed9e..c6735b1 100644 --- a/bumblebee_status/modules/core/redshift.py +++ b/bumblebee_status/modules/core/redshift.py @@ -101,7 +101,7 @@ class Module(core.module.Module): return val def update(self): - if self.__thread is not None and self.__thread.isAlive(): + if self.__thread is not None and self.__thread.is_alive(): return self.__thread = threading.Thread(target=get_redshift_value, args=(self,)) self.__thread.start()