desktop/python-tornado/0001-use_system_ca_certificates.patch

37 lines
1.2 KiB
Diff
Raw Normal View History

diff --git a/setup.py b/setup.py
index f09169f..d42c486 100644
--- a/setup.py
+++ b/setup.py
@@ -120,7 +120,7 @@ if (platform.python_implementation() == 'CPython' and
# Certifi is also optional on 2.7.9+, although making our dependencies
# conditional on micro version numbers seems like a bad idea
# until we have more declarative metadata.
- install_requires.append('certifi')
+ pass
if sys.version_info < (3, 5):
install_requires.append('backports_abc>=0.4')
kwargs['install_requires'] = install_requires
diff --git a/tornado/simple_httpclient.py b/tornado/simple_httpclient.py
index f0f73fa..ffe3e40 100644
--- a/tornado/simple_httpclient.py
+++ b/tornado/simple_httpclient.py
@@ -33,17 +33,9 @@ except ImportError:
# ssl is not available on Google App Engine.
ssl = None
-try:
- import certifi
-except ImportError:
- certifi = None
-
def _default_ca_certs():
- if certifi is None:
- raise Exception("The 'certifi' package is required to use https "
- "in simple_httpclient")
- return certifi.where()
+ return "/etc/ssl/certs/ca-certificates.crt"
class SimpleAsyncHTTPClient(AsyncHTTPClient):