From 4ad644ab7f1ff9fa078db8172091a40e194d1171 Mon Sep 17 00:00:00 2001 From: JonnyWong16 Date: Tue, 26 Dec 2017 15:27:03 -0800 Subject: [PATCH] Update http handler for new requests and certifi --- plexpy/http_handler.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/plexpy/http_handler.py b/plexpy/http_handler.py index 52476ce5..71cb3cab 100644 --- a/plexpy/http_handler.py +++ b/plexpy/http_handler.py @@ -20,9 +20,8 @@ from functools import partial from multiprocessing.dummy import Pool as ThreadPool from urlparse import urljoin -from requests import certs as certifi +import certifi from requests.packages import urllib3 -from requests.packages.urllib3.exceptions import InsecureRequestWarning import plexpy import helpers @@ -108,7 +107,7 @@ class HTTPHandler(object): if self.ssl_verify: session = urllib3.PoolManager(cert_reqs='CERT_REQUIRED', ca_certs=certifi.where()) else: - urllib3.disable_warnings(InsecureRequestWarning) + urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) session = urllib3.PoolManager() part = partial(self._http_requests_urllib3, session=session)