File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change 1
1
"""
2
- Set of utilities to retrieve Information from proxy
2
+ Set of utilities to retrieve Information from proxy
3
3
"""
4
+
4
5
import base64
5
6
6
7
from DIRAC import S_ERROR , S_OK , gLogger
7
8
from DIRAC .ConfigurationSystem .Client .Helpers import Registry
9
+ from DIRAC .ConfigurationSystem .Client .Helpers .CSGlobals import getVO
10
+
8
11
from DIRAC .Core .Security import Locations
9
12
from DIRAC .Core .Security .DiracX import diracxTokenFromPEM
10
13
from DIRAC .Core .Security .VOMS import VOMS
@@ -207,10 +210,11 @@ def getVOfromProxyGroup():
207
210
"""
208
211
Return the VO associated to the group in the proxy
209
212
"""
210
- voName = Registry . getVOForGroup ( "NoneExistingGroup" )
213
+
211
214
ret = getProxyInfo (disableVOMS = True )
212
- if not ret ["OK" ]:
213
- return S_OK ( voName )
214
- if "group" in ret [ "Value" ] :
215
+ if not ret ["OK" ] or "group" not in ret [ "Value" ] :
216
+ voName = getVO ( )
217
+ else :
215
218
voName = Registry .getVOForGroup (ret ["Value" ]["group" ])
219
+
216
220
return S_OK (voName )
You can’t perform that action at this time.
0 commit comments