Skip to content

Commit

Permalink
fix/race condition dictionary changed iteration
Browse files Browse the repository at this point in the history
bus events could cause the dict to change while being iterated
  • Loading branch information
JarbasAl committed Oct 26, 2021
1 parent 676f9a5 commit 47d8a1f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mycroft/client/enclosure/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ def __insert_new_namespace(self, namespace, pages):

# Load any already stored Data
data = self.datastore.get(namespace, {})
for key in data:
for key in dict(data):
msg = {"type": "mycroft.session.set",
"namespace": namespace,
"data": {key: data[key]}}
Expand Down

0 comments on commit 47d8a1f

Please sign in to comment.