pubsub.lazy_guild: use filter instead of genexpr

This commit is contained in:
Luna Mendes 2018-11-07 19:10:27 -03:00
parent 773ab8fd18
commit e1a946eb87
1 changed files with 3 additions and 1 deletions

View File

@ -393,9 +393,11 @@ class GuildMemberList:
} }
states = map(self.get_state, session_ids) states = map(self.get_state, session_ids)
states = filter(lambda state: state is not None, states)
dispatched = [] dispatched = []
for state in (s for s in states if s is not None): for state in states:
await state.ws.dispatch( await state.ws.dispatch(
'GUILD_MEMBER_LIST_UPDATE', payload) 'GUILD_MEMBER_LIST_UPDATE', payload)