@@ -71,7 +71,7 @@ def main():
71
71
Script .disableCS ()
72
72
Script .parseCommandLine ()
73
73
74
- from DIRAC import gLogger
74
+ from DIRAC import gLogger , exit as dExit
75
75
from DIRAC .Core .Security .ProxyInfo import getProxyInfo , getProxyStepsInfo
76
76
from DIRAC .Core .Security .ProxyInfo import formatProxyInfoAsString , formatProxyStepsInfoAsString
77
77
from DIRAC .Core .Security import VOMS
@@ -87,7 +87,7 @@ def main():
87
87
result = getProxyInfo (params .proxyLoc , not params .vomsEnabled )
88
88
if not result ["OK" ]:
89
89
gLogger .error (result ["Message" ])
90
- sys . exit (1 )
90
+ dExit (1 )
91
91
infoDict = result ["Value" ]
92
92
gLogger .notice (formatProxyInfoAsString (infoDict ))
93
93
if not infoDict ["isProxy" ]:
@@ -101,12 +101,13 @@ def main():
101
101
102
102
def invalidProxy (msg ):
103
103
gLogger .error ("Invalid proxy:" , msg )
104
- sys . exit (1 )
104
+ dExit (1 )
105
105
106
106
if params .uploadedInfo :
107
107
result = gProxyManager .getUserProxiesInfo ()
108
108
if not result ["OK" ]:
109
109
gLogger .error ("Could not retrieve the uploaded proxies info" , result ["Message" ])
110
+ dExit (1 )
110
111
else :
111
112
uploadedInfo = result ["Value" ]
112
113
if not uploadedInfo :
@@ -157,8 +158,6 @@ def invalidProxy(msg):
157
158
except Exception as e :
158
159
invalidProxy (f"Failed to access DiracX: { e } " )
159
160
160
- sys .exit (0 )
161
-
162
161
163
162
if __name__ == "__main__" :
164
163
main ()
0 commit comments