mirror of
https://github.com/certbot/certbot.git
synced 2026-05-28 04:34:11 -04:00
Make urllib3 injection more version specific.
This commit is contained in:
parent
d8e2ee0758
commit
503afebd54
1 changed files with 3 additions and 3 deletions
|
|
@ -8,7 +8,7 @@ from six.moves import http_client # pylint: disable=import-error
|
|||
|
||||
import OpenSSL
|
||||
import requests
|
||||
import six
|
||||
import sys
|
||||
import werkzeug
|
||||
|
||||
from acme import errors
|
||||
|
|
@ -19,8 +19,8 @@ from acme import messages
|
|||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
# https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning
|
||||
if six.PY2:
|
||||
# Python does not validate certificates by default before version 2.7.9
|
||||
if sys.version_info < (2, 7, 9):
|
||||
requests.packages.urllib3.contrib.pyopenssl.inject_into_urllib3()
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue