Remove the last await in comprehension for Py3.5

This commit is contained in:
Lonami Exo 2018-05-09 09:08:52 +02:00
parent 1b76c1fc7b
commit 3171efafcb

View File

@ -1734,10 +1734,12 @@ class TelegramClient(TelegramBareClient):
entity = await self.get_input_entity(entity)
if not utils.is_list_like(caption):
caption = (caption,)
captions = [
await self._parse_message_text(caption or '', parse_mode)
for caption in reversed(caption) # Pop from the end (so reverse)
]
captions = []
for caption in reversed(caption): # Pop from the end (so reverse)
captions.append(await self._parse_message_text(caption or '',
parse_mode))
reply_to = self._get_message_id(reply_to)
# Need to upload the media first, but only if they're not cached yet