mirror of
https://github.com/certbot/certbot.git
synced 2026-06-04 22:33:00 -04:00
Add workaround for platforms where injecting pyopenssl to urllib3 (#3990)
fails with requests package (Ubuntu Trusty)
This commit is contained in:
parent
30acc5cf47
commit
379807bf0d
1 changed files with 5 additions and 1 deletions
|
|
@ -27,7 +27,11 @@ logger = logging.getLogger(__name__)
|
|||
# for SSL, which does allow these options to be configured.
|
||||
# https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning
|
||||
if sys.version_info < (2, 7, 9): # pragma: no cover
|
||||
requests.packages.urllib3.contrib.pyopenssl.inject_into_urllib3()
|
||||
try:
|
||||
requests.packages.urllib3.contrib.pyopenssl.inject_into_urllib3()
|
||||
except AttributeError:
|
||||
import urllib3.contrib.pyopenssl # pylint: disable=import-error
|
||||
urllib3.contrib.pyopenssl.inject_into_urllib3()
|
||||
|
||||
DER_CONTENT_TYPE = 'application/pkix-cert'
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue