itervalues(d) calls d.itervalues() [PY2] and d.values() [PY3]
but SortedDict only implements d.values()
pull/14/head
Krombel 6 years ago
parent 82276a18d1
commit 79a8a347a6
  1. 1
      changelog.d/3445.bugfix
  2. 4
      synapse/federation/send_queue.py

@ -0,0 +1 @@
do not use six.itervalues() on SortedDict()

@ -32,7 +32,7 @@ Events are replicated via a separate events stream.
import logging import logging
from collections import namedtuple from collections import namedtuple
from six import iteritems, itervalues from six import iteritems
from sortedcontainers import SortedDict from sortedcontainers import SortedDict
@ -117,7 +117,7 @@ class FederationRemoteSendQueue(object):
user_ids = set( user_ids = set(
user_id user_id
for uids in itervalues(self.presence_changed) for uids in self.presence_changed.values()
for user_id in uids for user_id in uids
) )

Loading…
Cancel
Save