From 09f8900d3cccc11e29cec169a1c07364390790d1 Mon Sep 17 00:00:00 2001 From: aldbr Date: Tue, 26 Sep 2023 12:57:03 +0200 Subject: [PATCH] fix: AREX does not return an error if delegation not found --- src/DIRAC/Resources/Computing/AREXComputingElement.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/DIRAC/Resources/Computing/AREXComputingElement.py b/src/DIRAC/Resources/Computing/AREXComputingElement.py index df673d39deb..25838b617ff 100755 --- a/src/DIRAC/Resources/Computing/AREXComputingElement.py +++ b/src/DIRAC/Resources/Computing/AREXComputingElement.py @@ -294,7 +294,7 @@ def _getDelegationIDs(self): result = self._request("get", query) if not result["OK"]: self.log.error("Issue while interacting with the delegations.", result["Message"]) - return S_ERROR("Issue while interacting with the delegations") + return S_OK([]) response = result["Value"] # If there is no delegation, response.json is expected to return an exception @@ -422,9 +422,9 @@ def submitJob(self, executableFile, proxy, numberOfJobs=1, inputs=None, outputs= self.log.verbose(f"Executable file path: {executableFile}") - # Get a delegation and use the same delegation for all the jobs + # Get existing delegations result = self._getDelegationIDs() - if not result["OK"]: + if result["OK"]: self.log.error("Could not get delegation IDs.", result["Message"]) return S_ERROR("Could not get delegation IDs") delegationIDs = result["Value"]