@@ -356,11 +356,12 @@ def _killJob(self, arcJobList):
356
356
return S_ERROR ("REST interface not initialised. Cannot kill jobs." )
357
357
358
358
# Get a proxy
359
- result = self ._prepareProxy ()
360
- if not result ["OK" ]:
361
- self .log .error ("Failed to set up proxy" , result ["Message" ])
362
- return result
363
- self .session .cert = Locations .getProxyLocation ()
359
+ if self .proxy :
360
+ result = self ._prepareProxy ()
361
+ if not result ["OK" ]:
362
+ self .log .error ("Failed to set up proxy" , result ["Message" ])
363
+ return result
364
+ self .session .cert = Locations .getProxyLocation ()
364
365
365
366
# List of jobs in json format for the REST query
366
367
jobsJson = {"job" : [{"id" : job } for job in arcJobList ]}
@@ -393,11 +394,12 @@ def submitJob(self, executableFile, proxy, numberOfJobs=1, inputs=None, outputs=
393
394
self .log .verbose ("Executable file path:" , executableFile )
394
395
395
396
# Get a proxy
396
- result = self ._prepareProxy ()
397
- if not result ["OK" ]:
398
- self .log .error ("Failed to set up proxy" , result ["Message" ])
399
- return result
400
- self .session .cert = Locations .getProxyLocation ()
397
+ if self .proxy :
398
+ result = self ._prepareProxy ()
399
+ if not result ["OK" ]:
400
+ self .log .error ("Failed to set up proxy" , result ["Message" ])
401
+ return result
402
+ self .session .cert = Locations .getProxyLocation ()
401
403
402
404
# Get a "delegation" and use the same delegation for all the jobs
403
405
delegation = ""
@@ -476,11 +478,12 @@ def getCEStatus(self):
476
478
return S_ERROR ("REST interface not initialised. Cannot get CE status." )
477
479
478
480
# Get a proxy
479
- result = self ._prepareProxy ()
480
- if not result ["OK" ]:
481
- self .log .error ("Failed to set up proxy" , result ["Message" ])
482
- return result
483
- self .session .cert = Locations .getProxyLocation ()
481
+ if self .proxy :
482
+ result = self ._prepareProxy ()
483
+ if not result ["OK" ]:
484
+ self .log .error ("Failed to set up proxy" , result ["Message" ])
485
+ return result
486
+ self .session .cert = Locations .getProxyLocation ()
484
487
485
488
# Try to find out which VO we are running for.
486
489
# Essential now for REST interface.
@@ -597,11 +600,12 @@ def getJobStatus(self, jobIDList):
597
600
return S_ERROR ("REST interface not initialised. Cannot get job status." )
598
601
599
602
# Get a proxy
600
- result = self ._prepareProxy ()
601
- if not result ["OK" ]:
602
- self .log .error ("AREXComputingElement: failed to set up proxy" , result ["Message" ])
603
- return result
604
- self .session .cert = Locations .getProxyLocation ()
603
+ if self .proxy :
604
+ result = self ._prepareProxy ()
605
+ if not result ["OK" ]:
606
+ self .log .error ("AREXComputingElement: failed to set up proxy" , result ["Message" ])
607
+ return result
608
+ self .session .cert = Locations .getProxyLocation ()
605
609
606
610
if not isinstance (jobIDList , list ):
607
611
jobIDList = [jobIDList ]
@@ -688,11 +692,12 @@ def getJobLog(self, jobID):
688
692
return S_ERROR ("REST interface not initialised. Cannot get job output." )
689
693
690
694
# Get a proxy
691
- result = self ._prepareProxy ()
692
- if not result ["OK" ]:
693
- self .log .error ("AREXComputingElement: failed to set up proxy" , result ["Message" ])
694
- return result
695
- self .session .cert = Locations .getProxyLocation ()
695
+ if self .proxy :
696
+ result = self ._prepareProxy ()
697
+ if not result ["OK" ]:
698
+ self .log .error ("AREXComputingElement: failed to set up proxy" , result ["Message" ])
699
+ return result
700
+ self .session .cert = Locations .getProxyLocation ()
696
701
697
702
# Extract stamp from the Job ID
698
703
if ":::" in jobID :
@@ -749,11 +754,12 @@ def getJobOutput(self, jobID, workingDirectory=None):
749
754
return S_ERROR ("REST interface not initialised. Cannot get job output." )
750
755
751
756
# Get a proxy
752
- result = self ._prepareProxy ()
753
- if not result ["OK" ]:
754
- self .log .error ("AREXComputingElement: failed to set up proxy" , result ["Message" ])
755
- return result
756
- self .session .cert = Locations .getProxyLocation ()
757
+ if self .proxy :
758
+ result = self ._prepareProxy ()
759
+ if not result ["OK" ]:
760
+ self .log .error ("AREXComputingElement: failed to set up proxy" , result ["Message" ])
761
+ return result
762
+ self .session .cert = Locations .getProxyLocation ()
757
763
758
764
# Extract stamp from the Job ID
759
765
if ":::" in jobID :
0 commit comments