Skip to content

Commit

Permalink
Merge pull request #1109 from MetPX/issue912_bugfix
Browse files Browse the repository at this point in the history
fix crash where 'dictionary changed size during iteration'
  • Loading branch information
petersilva authored Jun 13, 2024
2 parents 0dc5122 + 594f209 commit e2e39cf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sarracenia/flowcb/retry.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ def gather(self, qty) -> None:

# eliminate calculated values so it is refiltered from scratch.
for m in message_list:
for k in m:
if k in m['_deleteOnPost'] or k.startswith('new_'):
for k in list(m.keys()):
if k in m and (k in m['_deleteOnPost'] or k.startswith('new_')):
del m[k]
m['_isRetry'] = True
m['_deleteOnPost'] = set( [ '_isRetry' ] )
Expand Down

0 comments on commit e2e39cf

Please sign in to comment.