1
0
mirror of https://github.com/eternnoir/pyTelegramBotAPI.git synced 2023-08-10 21:12:57 +03:00
This commit is contained in:
the31k 2017-07-19 15:44:10 +03:00
parent feec19b7f4
commit 96569cbdac

View File

@ -50,7 +50,7 @@ def _make_request(token, method_name, method='get', params=None, files=None, bas
if params: if params:
if 'timeout' in params: read_timeout = params['timeout'] + 10 if 'timeout' in params: read_timeout = params['timeout'] + 10
if 'connect-timeout' in params: connect_timeout = params['connect-timeout'] + 10 if 'connect-timeout' in params: connect_timeout = params['connect-timeout'] + 10
result = _get_req_session().req_session.request(method, request_url, params=params, files=files, result = _get_req_session().request(method, request_url, params=params, files=files,
timeout=(connect_timeout, read_timeout), proxies=proxy) timeout=(connect_timeout, read_timeout), proxies=proxy)
logger.debug("The server returned: '{0}'".format(result.text.encode('utf8'))) logger.debug("The server returned: '{0}'".format(result.text.encode('utf8')))
return _check_result(method_name, result)['result'] return _check_result(method_name, result)['result']