From f7244ddd0da060b04617d5cc6cab5fa3f9a0d07b Mon Sep 17 00:00:00 2001 From: Diego Tavares Date: Thu, 24 Oct 2024 08:23:06 -0700 Subject: [PATCH] [rqd] Avoid changing dict in place during iteration (#1554) Deleting an item from the dict being iterated over on sanitizeFrames caused the error: "Dictionary changed size during iteration". --- rqd/rqd/rqcore.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rqd/rqd/rqcore.py b/rqd/rqd/rqcore.py index 5b85efe75..22cc4eec8 100644 --- a/rqd/rqd/rqcore.py +++ b/rqd/rqd/rqcore.py @@ -1091,7 +1091,8 @@ def sanitizeFrames(self): Iterate over the cache and update the status of frames that might have completed but never reported back to cuebot. """ - for frameId, runningFrame in self.__cache.items(): + for frameId in list(self.__cache.keys): + runningFrame = self.__cache[frameId] # If the frame was marked as completed (exitStatus) and a report has not been sent # try to file the report again if runningFrame.exitStatus is not None and not runningFrame.completeReportSent: