diff --git a/src/DIRAC/WorkloadManagementSystem/Agent/JobCleaningAgent.py b/src/DIRAC/WorkloadManagementSystem/Agent/JobCleaningAgent.py index 948db5c66f8..28631f4a7fa 100644 --- a/src/DIRAC/WorkloadManagementSystem/Agent/JobCleaningAgent.py +++ b/src/DIRAC/WorkloadManagementSystem/Agent/JobCleaningAgent.py @@ -211,7 +211,7 @@ def deleteJobsByStatus(self, condDict, delay=False): failedJobs = result["Value"][JobStatus.FAILED] for job in failedJobs: - jobList.pop(jobList.index(job)) + jobList.pop(jobList.index(str(job))) if not jobList: return S_OK()