Consistently use six's iteritems and wrap lazy keys/values in list() if they're not meant to be lazy (#3307)

This commit is contained in:
Amber Brown 2018-05-31 19:03:47 +10:00 committed by GitHub
parent 872cf43516
commit c936a52a9e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
29 changed files with 116 additions and 101 deletions

View file

@ -391,7 +391,7 @@ class FederationClient(FederationBase):
"""
if return_local:
seen_events = yield self.store.get_events(event_ids, allow_rejected=True)
signed_events = seen_events.values()
signed_events = list(seen_events.values())
else:
seen_events = yield self.store.have_seen_events(event_ids)
signed_events = []
@ -589,7 +589,7 @@ class FederationClient(FederationBase):
}
valid_pdus = yield self._check_sigs_and_hash_and_fetch(
destination, pdus.values(),
destination, list(pdus.values()),
outlier=True,
)