Actually fix ids= not being a list, bump 1.6.1

This commit is contained in:
Lonami Exo 2019-02-28 08:31:28 +01:00
parent 2681dc09bb
commit df534585e9
2 changed files with 5 additions and 5 deletions

View File

@ -221,18 +221,18 @@ class _IDsIter(RequestIter):
async def _init(self, entity, ids): async def _init(self, entity, ids):
# TODO We never actually split IDs in chunks, but maybe we should # TODO We never actually split IDs in chunks, but maybe we should
if not utils.is_list_like(ids): if not utils.is_list_like(ids):
self.ids = [ids] ids = [ids]
elif not ids: elif not ids:
raise StopAsyncIteration raise StopAsyncIteration
elif self.reverse: elif self.reverse:
self.ids = list(reversed(ids)) ids = list(reversed(ids))
else: else:
self.ids = ids ids = ids
if entity: if entity:
entity = await self.client.get_input_entity(entity) entity = await self.client.get_input_entity(entity)
self.total = len(self.ids) self.total = len(ids)
from_id = None # By default, no need to validate from_id from_id = None # By default, no need to validate from_id
if isinstance(entity, (types.InputChannel, types.InputPeerChannel)): if isinstance(entity, (types.InputChannel, types.InputPeerChannel)):

View File

@ -1,3 +1,3 @@
# Versions should comply with PEP440. # Versions should comply with PEP440.
# This line is parsed in setup.py: # This line is parsed in setup.py:
__version__ = '1.6' __version__ = '1.6.1'