Use a list comprehension

This commit is contained in:
Mark Haines 2015-12-22 14:03:24 +00:00
parent c058625959
commit 251aafccca

View file

@ -195,9 +195,10 @@ class SyncHandler(BaseHandler):
now_token = yield self.event_sources.get_current_token() now_token = yield self.event_sources.get_current_token()
if sync_config.is_guest: if sync_config.is_guest:
room_list = [] room_list = [
for room_id in sync_config.filter.list_rooms(): GuestRoom(room_id, Membership.JOIN)
room_list.append(GuestRoom(room_id, Membership.JOIN)) for room_id in sync_config.filter.list_rooms()
]
account_data = {} account_data = {}
account_data_by_room = {} account_data_by_room = {}