Skip to content

Commit 48bcc31

Browse files
anton-tagunovtsnoam
authored andcommitted
set timeout for post message with file object (python-telegram-bot#486)
1 parent 6a01164 commit 48bcc31

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

AUTHORS.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Contributors
99
The following wonderful people contributed directly or indirectly to this project:
1010

1111
- `Avanatiker <https://github.com/Avanatiker>`_
12+
- `Anton Tagunov <https://github.com/anton-tagunov>`_
1213
- `Balduro <https://github.com/Balduro>`_
1314
- `bimmlerd <https://github.com/bimmlerd>`_
1415
- `Eli Gao <https://github.com/eligao>`_

telegram/utils/request.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,11 @@ def post(self, url, data, timeout=None):
196196

197197
if InputFile.is_inputfile(data):
198198
data = InputFile(data)
199-
result = self._request_wrapper('POST', url, body=data.to_form(), headers=data.headers)
199+
result = self._request_wrapper('POST',
200+
url,
201+
body=data.to_form(),
202+
headers=data.headers,
203+
**urlopen_kwargs)
200204
else:
201205
data = json.dumps(data)
202206
result = self._request_wrapper(

0 commit comments

Comments
 (0)