2
0
mirror of https://opendev.org/x/pyghmi synced 2025-01-15 04:07:48 +00:00

Use list() to avoid size change during iteration

Since we want to delete as we iterate, use list() to make a copy
that will survive modification during iteration.

Change-Id: I4b0425acbe01a84a47d6cbaa2138e8bc908b2dfe
This commit is contained in:
Jarrod Johnson 2018-08-16 09:24:24 -04:00
parent 2c25baf4ca
commit 24f847049f

View File

@ -118,7 +118,7 @@ def define_worker():
for w in iowaiters:
w[1].set()
iowaiters = []
for d in directediowaiters:
for d in list(directediowaiters):
# these are the existing waiters that didn't get
# satisfied last graball, allow them to set a new
# deadline if they still have time waiting, or