From 539b31f26016340c34ee28611fffd90da61b2971 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Sat, 13 Aug 2016 16:00:35 +0200 Subject: [PATCH] Fixed an AttributeError --- telegram.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/telegram.py b/telegram.py index 7cd9e13a..87d5718c 100644 --- a/telegram.py +++ b/telegram.py @@ -15,8 +15,8 @@ async def send_message(msg: str, to: int): "chat_id": to, "text": msg } - r = loop.run_in_executor(None, functools.partial(requests.get, params=params), - "https://api.telegram.org/bot{token}/sendMessage".format(token=token)) + r = await loop.run_in_executor(None, functools.partial(requests.get, params=params), + "https://api.telegram.org/bot{token}/sendMessage".format(token=token)) if r.status_code == 200: return else: