Skip to content

Commit

Permalink
fix: AREX does not return an error if delegation not found
Browse files Browse the repository at this point in the history
  • Loading branch information
aldbr committed Sep 26, 2023
1 parent 0141194 commit 09f8900
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/DIRAC/Resources/Computing/AREXComputingElement.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"]
Expand Down

0 comments on commit 09f8900

Please sign in to comment.