Skip to content

Commit d1ebe08

Browse files
committed
fix: VO should be returned properly in AREX.getCEStatus()
1 parent 50503e2 commit d1ebe08

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

src/DIRAC/Resources/Computing/AREXComputingElement.py

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,10 @@ def _getDelegationIDs(self):
318318
return S_OK(delegationIDs)
319319

320320
def _getProxyFromDelegationID(self, delegationID):
321-
"""Get proxy stored within the"""
321+
"""Get proxy stored within the delegation
322+
323+
:param str delegationID: delegation ID
324+
"""
322325
query = self._urlJoin(os.path.join("delegations", delegationID))
323326
params = {"action": "get"}
324327

@@ -595,10 +598,14 @@ def getCEStatus(self):
595598
self.log.error("Cannot get CE Status", result["Message"])
596599
return result
597600

598-
# Try to find out which VO we are running for.
601+
# Find out which VO we are running for.
599602
# Essential now for REST interface.
600-
res = getVOfromProxyGroup()
601-
vo = res["Value"] if res["OK"] else ""
603+
result = getVOfromProxyGroup()
604+
if not result["OK"]:
605+
return result
606+
if not result["Value"]:
607+
return S_ERROR("Could not get VO value from the proxy group")
608+
vo = result["Value"]
602609

603610
# Prepare the command
604611
params = {"schema": "glue2"}

0 commit comments

Comments
 (0)