Merge pull request #3202 from cbxbiker61/devel

fix RuntimeError: dictionary changed size during iteration
This commit is contained in:
Gina Häußge authored and GitHub committed 2019-07-25 10:17:45 +02:00
commit dbe07af426
1 file changed
+3 -1
+3 -1
View File
@@ -525,7 +525,9 @@ def _delete_chamber(x):
def _delete_from_data(x, key_matcher):
data = dict(x)
for k in data.keys():
# must make list of keys first to avoid
# RuntimeError: dictionary changed size during iteration
for k in list(data.keys()):
if key_matcher(k):
del data[k]
return data