From 2557e83957b9ae4b19d0a90d1cee2cdbed8073b8 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Thu, 13 Oct 2022 18:01:24 -0400 Subject: [PATCH] Support newer python is_alive method name Python changed isAlive to is_alive, check and adapt if the running python killed off the isAlive name. Change-Id: I0369aab0308d6f2d9d7de489b6e1f9c3f2365204 --- pyghmi/util/webclient.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pyghmi/util/webclient.py b/pyghmi/util/webclient.py index 706ec60e..ee27f428 100644 --- a/pyghmi/util/webclient.py +++ b/pyghmi/util/webclient.py @@ -60,6 +60,8 @@ class FileUploader(threading.Thread): self.formwrap = formwrap self.excepterror = excepterror super(FileUploader, self).__init__() + if not hasattr(self, 'isAlive'): + self.isAlive = self.is_alive def run(self): try: @@ -84,6 +86,8 @@ class FileDownloader(threading.Thread): self.savefile = savefile self.exc = None super(FileDownloader, self).__init__() + if not hasattr(self, 'isAlive'): + self.isAlive = self.is_alive def run(self): try: