From 48bcc3129a030c99cd7b4fbd9da23808e23d51ab Mon Sep 17 00:00:00 2001 From: Anton Tagunov Date: Thu, 29 Dec 2016 13:01:58 +0300 Subject: [PATCH] set timeout for post message with file object (#486) --- AUTHORS.rst | 1 + telegram/utils/request.py | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/AUTHORS.rst b/AUTHORS.rst index 1d56ca8fd..d9d2217b6 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -9,6 +9,7 @@ Contributors The following wonderful people contributed directly or indirectly to this project: - `Avanatiker `_ +- `Anton Tagunov `_ - `Balduro `_ - `bimmlerd `_ - `Eli Gao `_ diff --git a/telegram/utils/request.py b/telegram/utils/request.py index 594d35e4b..670df3969 100644 --- a/telegram/utils/request.py +++ b/telegram/utils/request.py @@ -196,7 +196,11 @@ class Request(object): if InputFile.is_inputfile(data): data = InputFile(data) - result = self._request_wrapper('POST', url, body=data.to_form(), headers=data.headers) + result = self._request_wrapper('POST', + url, + body=data.to_form(), + headers=data.headers, + **urlopen_kwargs) else: data = json.dumps(data) result = self._request_wrapper(