mirror of
https://mau.dev/maunium/synapse.git
synced 2024-12-15 11:23:52 +01:00
Use generators
This commit is contained in:
parent
40453b3f84
commit
84fbb80c8f
1 changed files with 2 additions and 2 deletions
|
@ -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 a new issue