Fix TypeError: 'dict_keys' object is not reversible (#14280)

This commit is contained in:
Erik Johnston 2022-10-24 13:05:14 +01:00 committed by GitHub
parent 1c642156d7
commit 09b588854e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

1
changelog.d/14280.bugfix Normal file
View File

@ -0,0 +1 @@
Fix broken outbound federation when using Python 3.7. Broke in v1.70.0rc1.

View File

@ -536,8 +536,7 @@ class FederationSender(AbstractFederationSender):
if event_entries: if event_entries:
now = self.clock.time_msec() now = self.clock.time_msec()
last_id = next(reversed(event_ids)) ts = max(t for t in event_to_received_ts.values() if t)
ts = event_to_received_ts[last_id]
assert ts is not None assert ts is not None
synapse.metrics.event_processing_lag.labels( synapse.metrics.event_processing_lag.labels(