diff --git a/src/DIRAC/RequestManagementSystem/Agent/RequestExecutingAgent.py b/src/DIRAC/RequestManagementSystem/Agent/RequestExecutingAgent.py index 87618a6739b..749b899ed27 100644 --- a/src/DIRAC/RequestManagementSystem/Agent/RequestExecutingAgent.py +++ b/src/DIRAC/RequestManagementSystem/Agent/RequestExecutingAgent.py @@ -192,7 +192,7 @@ def putAllRequests(self): :param self: self reference """ self.log.info("putAllRequests: will put back requests", f"{len(self.__requestCache)}") - for requestID in self.__requestCache.keys(): + for requestID in list(self.__requestCache.keys()): reset = self.putRequest(requestID) if not reset["OK"]: self.log.error("Failed to put request", reset["Message"])