Skip to content

Commit

Permalink
[rqd] Avoid changing dict in place during iteration (#1554)
Browse files Browse the repository at this point in the history
Deleting an item from the dict being iterated over on sanitizeFrames
caused the error: "Dictionary changed size during iteration".
  • Loading branch information
DiegoTavares authored Oct 24, 2024
1 parent 149b1e2 commit f7244dd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion rqd/rqd/rqcore.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit f7244dd

Please sign in to comment.