1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
|
Description: Looks for ca-certificates.crt at the good Debian location before trying local path
Author: Carl Chenet <chaica@ohmytux.com>
--- a/tornado/simple_httpclient.py
+++ b/tornado/simple_httpclient.py
@@ -30,7 +30,10 @@ try:
except ImportError:
import urllib.parse as urlparse # py3
-_DEFAULT_CA_CERTS = os.path.dirname(__file__) + '/ca-certificates.crt'
+if os.path.exists('/etc/ssl/certs/ca-certificates.crt'):
+ _DEFAULT_CA_CERTS = '/etc/ssl/certs/ca-certificates.crt'
+else:
+ _DEFAULT_CA_CERTS = os.path.dirname(__file__) + '/ca-certificates.crt'
class SimpleAsyncHTTPClient(AsyncHTTPClient):
|