diff --git a/src/WebAppDIRAC/WebApp/handler/JobMonitorHandler.py b/src/WebAppDIRAC/WebApp/handler/JobMonitorHandler.py index 0aa78ec8..232ef214 100644 --- a/src/WebAppDIRAC/WebApp/handler/JobMonitorHandler.py +++ b/src/WebAppDIRAC/WebApp/handler/JobMonitorHandler.py @@ -287,6 +287,7 @@ def web_jobAction(self, JobID): ids = [int(i) for i in ids] RPC = JobManagerClient() + result = None if self.get_argument("action") == "delete": result = RPC.deleteJob(ids) elif self.get_argument("action") == "kill": diff --git a/src/WebAppDIRAC/WebApp/handler/TokenManagerHandler.py b/src/WebAppDIRAC/WebApp/handler/TokenManagerHandler.py index 4d6f657b..2b742cfe 100644 --- a/src/WebAppDIRAC/WebApp/handler/TokenManagerHandler.py +++ b/src/WebAppDIRAC/WebApp/handler/TokenManagerHandler.py @@ -2,7 +2,7 @@ import datetime import jwt -from DIRAC import gConfig, gLogger +from DIRAC import gLogger from DIRAC.ConfigurationSystem.Client.Helpers.Registry import getAllUsers from DIRAC.FrameworkSystem.Client.TokenManagerClient import TokenManagerClient @@ -93,6 +93,7 @@ def web_tokenData(self, userid: str, data_kind: str) -> dict: :return: dict """ if (result := self.tm.getTokensByUserID(userid))["OK"]: + res = "" if data_kind == "getAccessToken": res = ( str(jwt.decode(result["Value"][0]["access_token"], options={"verify_signature": False})) diff --git a/src/WebAppDIRAC/WebApp/handler/TransformationMonitorHandler.py b/src/WebAppDIRAC/WebApp/handler/TransformationMonitorHandler.py index f6b1ac97..bd8c42b7 100644 --- a/src/WebAppDIRAC/WebApp/handler/TransformationMonitorHandler.py +++ b/src/WebAppDIRAC/WebApp/handler/TransformationMonitorHandler.py @@ -213,6 +213,7 @@ def web_executeOperation(self, action, ids): def __fileRetry(self, prodid, mode): tsClient = TransformationClient() + result = None if mode == "proc": result = tsClient.getTransformationFilesCount(prodid, "ErrorCount", {"Status": "Processed"}) elif mode == "not":