瀏覽代碼

Merge pull request #487 from misnyo/#485

[fix]#485 AttributeError: 'module' object has no attribute 'old_where'
Adam Tauber 9 年之前
父節點
當前提交
46f2a4fab8
共有 1 個檔案被更改,包括 2 行新增1 行删除
  1. 2
    1
      searx/__init__.py

+ 2
- 1
searx/__init__.py 查看文件

52
 # Workaround for openssl versions <1.0.2
52
 # Workaround for openssl versions <1.0.2
53
 # https://github.com/certifi/python-certifi/issues/26
53
 # https://github.com/certifi/python-certifi/issues/26
54
 if OPENSSL_VERSION_INFO[0:3] < (1, 0, 2):
54
 if OPENSSL_VERSION_INFO[0:3] < (1, 0, 2):
55
-    environ['REQUESTS_CA_BUNDLE'] = certifi.old_where()
55
+    if hasattr(certifi, 'old_where'):
56
+        environ['REQUESTS_CA_BUNDLE'] = certifi.old_where()
56
     logger.warning('You are using an old openssl version({0}), please upgrade above 1.0.2!'.format(OPENSSL_VERSION))
57
     logger.warning('You are using an old openssl version({0}), please upgrade above 1.0.2!'.format(OPENSSL_VERSION))
57
 
58
 
58
 logger.info('Initialisation done')
59
 logger.info('Initialisation done')