Change suppress HTTPS verification InsecureRequestWarning.

Suppress this potentially confusing warning because many sites use self-certified certificates.

Change a couple of lib references to be full paths.
This commit is contained in:
JackDandy 2014-11-20 03:06:45 +00:00
parent d03f198e13
commit 6da09b8db0
6 changed files with 7 additions and 3 deletions

View file

@ -29,6 +29,7 @@
* Fix Config Post Processing "Anime name pattern" custom javascript validation
* Add check that SSLv3 is available before use by requests lib
* Update Requests library 2.3.0 to 2.4.3 (9dc6602)
* Change suppress HTTPS verification InsecureRequestWarning as many sites use self-certified certificates.
[develop changelog]

View file

@ -2,3 +2,4 @@ Libs with customisations...
/tornado
/lib/requests/packages/urllib3/contrib/pyopenssl.py
/lib/requests/packages/urllib3/connectionpool.py

View file

@ -21,6 +21,6 @@ except ImportError:
# Handle the case where the requests has been patched to not have urllib3
# bundled as part of it's source.
try:
from requests.packages.urllib3.response import HTTPResponse
from lib.requests.packages.urllib3.response import HTTPResponse
except ImportError:
from urllib3.response import HTTPResponse

View file

@ -721,6 +721,7 @@ class HTTPSConnectionPool(HTTPConnectionPool):
if not getattr(conn, 'sock', None): # AppEngine might not have `.sock`
conn.connect()
"""
if not conn.is_verified:
warnings.warn((
'Unverified HTTPS request is being made. '
@ -728,6 +729,7 @@ class HTTPSConnectionPool(HTTPConnectionPool):
'https://urllib3.readthedocs.org/en/latest/security.html '
'(This warning will only appear once by default.)'),
InsecureRequestWarning)
"""
def connection_from_url(url, **kw):

View file

@ -29,7 +29,7 @@ except ImportError:
import xml.etree.ElementTree as ElementTree
from lib.dateutil.parser import parse
from cachecontrol import CacheControl, caches
from lib.cachecontrol import CacheControl, caches
from tvrage_ui import BaseUI
from tvrage_exceptions import (tvrage_error, tvrage_userabort, tvrage_shownotfound,

View file

@ -62,7 +62,7 @@ from sickbeard import encodingKludge as ek
from sickbeard import notifiers
from sickbeard import clients
from cachecontrol import CacheControl, caches
from lib.cachecontrol import CacheControl, caches
from itertools import izip, cycle
urllib._urlopener = classes.SickBeardURLopener()