mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-16 02:02:58 -07:00
Update http handler for new requests and certifi
This commit is contained in:
parent
f1783df8d6
commit
4ad644ab7f
1 changed files with 2 additions and 3 deletions
|
@ -20,9 +20,8 @@ from functools import partial
|
||||||
from multiprocessing.dummy import Pool as ThreadPool
|
from multiprocessing.dummy import Pool as ThreadPool
|
||||||
from urlparse import urljoin
|
from urlparse import urljoin
|
||||||
|
|
||||||
from requests import certs as certifi
|
import certifi
|
||||||
from requests.packages import urllib3
|
from requests.packages import urllib3
|
||||||
from requests.packages.urllib3.exceptions import InsecureRequestWarning
|
|
||||||
|
|
||||||
import plexpy
|
import plexpy
|
||||||
import helpers
|
import helpers
|
||||||
|
@ -108,7 +107,7 @@ class HTTPHandler(object):
|
||||||
if self.ssl_verify:
|
if self.ssl_verify:
|
||||||
session = urllib3.PoolManager(cert_reqs='CERT_REQUIRED', ca_certs=certifi.where())
|
session = urllib3.PoolManager(cert_reqs='CERT_REQUIRED', ca_certs=certifi.where())
|
||||||
else:
|
else:
|
||||||
urllib3.disable_warnings(InsecureRequestWarning)
|
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
|
||||||
session = urllib3.PoolManager()
|
session = urllib3.PoolManager()
|
||||||
part = partial(self._http_requests_urllib3, session=session)
|
part = partial(self._http_requests_urllib3, session=session)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue