ypaf fixes

This commit is contained in:
Noam Meltzer 2016-06-18 19:57:11 +03:00
parent fc05d3a626
commit 494a7ec1e4

View file

@ -39,13 +39,12 @@ def _get_con_pool():
if _CON_POOL is not None:
return _CON_POOL
_CON_POOL = urllib3.PoolManager(
maxsize=CON_POOL_SIZE,
cert_reqs='CERT_REQUIRED',
ca_certs=certifi.where(),
socket_options=HTTPConnection.default_socket_options + [
(socket.SOL_SOCKET, socket.SO_KEEPALIVE, 1),
])
_CON_POOL = urllib3.PoolManager(maxsize=CON_POOL_SIZE,
cert_reqs='CERT_REQUIRED',
ca_certs=certifi.where(),
socket_options=HTTPConnection.default_socket_options + [
(socket.SOL_SOCKET, socket.SO_KEEPALIVE, 1),
])
return _CON_POOL
@ -60,7 +59,6 @@ def stop_con_pool():
_CON_POOL = None
def _parse(json_data):
"""Try and parse the JSON returned from Telegram.