Fix dictionary changed size during iteration

Make a copy of the keys before we operate on it

Fixes LP# : 1212854

Change-Id: I431ffb3878863e9be6d1a35078f7d7c3edf4b133
This commit is contained in:
Davanum Srinivas 2013-08-17 22:02:02 -04:00
parent 2564795108
commit 0555e939be

View File

@ -115,7 +115,7 @@ class ReplyWaiters(object):
queue.put(message_data)
def wake_all(self, except_id):
msg_ids = [i for i in self._queues if i != except_id]
msg_ids = [i for i in self._queues.keys() if i != except_id]
for msg_id in msg_ids:
self.put(msg_id, None)