File tree Expand file tree Collapse file tree
WorkloadManagementSystem/Service Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -449,8 +449,8 @@ def killPilot(self, gridReference):
449449 :param gridReference: Pilot Job Reference
450450 :return: S_OK,S_ERROR
451451 """
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" )
454454
455455 result = PilotManagerClient ().killPilot (gridReference )
456456 return result
Original file line number Diff line number Diff line change @@ -339,16 +339,15 @@ def export_getPilots(cls, jobID):
339339 def export_killPilot (cls , pilotRefList ):
340340 """Kill the specified pilots"""
341341 # Make a list if it is not yet
342- pilotRefs = list (pilotRefList )
343342 if isinstance (pilotRefList , str ):
344- pilotRefs = [pilotRefList ]
343+ pilotRefList = [pilotRefList ]
345344
346345 # Regroup pilots per site
347346 pilotRefDict = {}
348- for pilotReference in pilotRefs :
347+ for pilotReference in pilotRefList :
349348 result = cls .pilotAgentsDB .getPilotInfo (pilotReference )
350349 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 } " )
352351
353352 pilotDict = result ["Value" ][pilotReference ]
354353 queue = "@@@" .join (
You can’t perform that action at this time.
0 commit comments