mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-10-01 08:25:44 -04:00
Use generators
This commit is contained in:
parent
40453b3f84
commit
84fbb80c8f
@ -282,7 +282,7 @@ class FederationRemoteSendQueue(object):
|
||||
keys = self.edus.keys()
|
||||
i = keys.bisect_right(from_token)
|
||||
j = keys.bisect_right(to_token) + 1
|
||||
edus = [(k, self.edus[k]) for k in keys[i:j]]
|
||||
edus = ((k, self.edus[k]) for k in keys[i:j])
|
||||
|
||||
for (pos, edu) in edus:
|
||||
rows.append((pos, EduRow(edu)))
|
||||
@ -291,7 +291,7 @@ class FederationRemoteSendQueue(object):
|
||||
keys = self.failures.keys()
|
||||
i = keys.bisect_right(from_token)
|
||||
j = keys.bisect_right(to_token) + 1
|
||||
failures = [(k, self.failures[k]) for k in keys[i:j]]
|
||||
failures = ((k, self.failures[k]) for k in keys[i:j])
|
||||
|
||||
for (pos, (destination, failure)) in failures:
|
||||
rows.append((pos, FailureRow(
|
||||
|
Loading…
Reference in New Issue
Block a user