Use a list comprehension

pull/455/head
Mark Haines 2015-12-22 14:03:24 +00:00
parent c058625959
commit 251aafccca
1 changed files with 4 additions and 3 deletions

View File

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