File tree Expand file tree Collapse file tree 2 files changed +5
-6
lines changed
WorkloadManagementSystem/Service Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -449,8 +449,8 @@ def killPilot(self, gridReference):
449
449
:param gridReference: Pilot Job Reference
450
450
:return: S_OK,S_ERROR
451
451
"""
452
- if not isinstance (gridReference , str ):
453
- return self ._errorReport ("Expected string for pilot reference" )
452
+ if not isinstance (gridReference , ( str , list ) ):
453
+ return self ._errorReport ("Expected string or list of strings for pilot reference" )
454
454
455
455
result = PilotManagerClient ().killPilot (gridReference )
456
456
return result
Original file line number Diff line number Diff line change @@ -339,16 +339,15 @@ def export_getPilots(cls, jobID):
339
339
def export_killPilot (cls , pilotRefList ):
340
340
"""Kill the specified pilots"""
341
341
# Make a list if it is not yet
342
- pilotRefs = list (pilotRefList )
343
342
if isinstance (pilotRefList , str ):
344
- pilotRefs = [pilotRefList ]
343
+ pilotRefList = [pilotRefList ]
345
344
346
345
# Regroup pilots per site
347
346
pilotRefDict = {}
348
- for pilotReference in pilotRefs :
347
+ for pilotReference in pilotRefList :
349
348
result = cls .pilotAgentsDB .getPilotInfo (pilotReference )
350
349
if not result ["OK" ] or not result ["Value" ]:
351
- return S_ERROR ("Failed to get info for pilot " + pilotReference )
350
+ return S_ERROR (f "Failed to get info for pilot { pilotReference } " )
352
351
353
352
pilotDict = result ["Value" ][pilotReference ]
354
353
queue = "@@@" .join (
You can’t perform that action at this time.
0 commit comments