diff --git a/src/python/WMCore/WMRuntime/Watchdog.py b/src/python/WMCore/WMRuntime/Watchdog.py index 05dcd3e1ec..f7e535047c 100644 --- a/src/python/WMCore/WMRuntime/Watchdog.py +++ b/src/python/WMCore/WMRuntime/Watchdog.py @@ -327,3 +327,16 @@ def initMonitorFwk(self, monitorCfg, updatorCfg): # self._MonMgr.loadMonitors() # self._MonMgr.loadUpdators() return + + def isAlive(self): + """ + :return whether this class thread is alive or not. + """ + try: + # For python 3.8 and below + value = super(Watchdog, self).isAlive() + except AttributeError: + # For python 3.9 and above + value = self.is_alive() + + return value