Oops. Repair Dispatcher._process_pooling_updates

This commit is contained in:
Alex Root Junior 2017-08-28 16:08:09 +03:00
parent 77e2d4c44a
commit a5d983a522

View file

@ -188,12 +188,11 @@ class Dispatcher:
:param updates: list of updates. :param updates: list of updates.
""" """
need_to_call = [] need_to_call = []
for update in await self.process_updates(updates): for response in await self.process_updates(updates):
for responses in update: for response in response:
for response in responses: if not isinstance(response, BaseResponse):
if not isinstance(response, BaseResponse): continue
continue need_to_call.append(response.execute_response(self.bot))
need_to_call.append(response.execute_response(self.bot))
if need_to_call: if need_to_call:
try: try:
asyncio.gather(*need_to_call) asyncio.gather(*need_to_call)