From 3171efafcbf09642c2975c279ab45cf8c5724221 Mon Sep 17 00:00:00 2001 From: Lonami Exo Date: Wed, 9 May 2018 09:08:52 +0200 Subject: [PATCH] Remove the last await in comprehension for Py3.5 --- telethon/telegram_client.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/telethon/telegram_client.py b/telethon/telegram_client.py index 9e9614b1..e6de56ea 100644 --- a/telethon/telegram_client.py +++ b/telethon/telegram_client.py @@ -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