Fix syntax error

This commit is contained in:
Erik Johnston 2016-08-03 15:03:15 +01:00
parent a60a2eaa02
commit 520ee9bd2c

View File

@ -325,10 +325,17 @@ class FederationClient(FederationBase):
state_event_ids = result["pdus"] state_event_ids = result["pdus"]
auth_event_ids = result.get("auth_chain", []) auth_event_ids = result.get("auth_chain", [])
event_map, _failed_to_fetch = yield self.get_events( fetched_events, failed_to_fetch = yield self.get_events(
[destination], room_id, set(state_event_ids + auth_event_ids) [destination], room_id, set(state_event_ids + auth_event_ids)
) )
if failed_to_fetch:
logger.warn("Failed to get %r", failed_to_fetch)
event_map = {
ev.event_id: ev for ev in fetched_events
}
pdus = [event_map[e_id] for e_id in state_event_ids] pdus = [event_map[e_id] for e_id in state_event_ids]
auth_chain = [event_map[e_id] for e_id in auth_event_ids] auth_chain = [event_map[e_id] for e_id in auth_event_ids]