Browse Source

[fix]#485 AttributeError: 'module' object has no attribute 'old_where'

misnyo 9 years ago
parent
commit
f86e212dba
1 changed files with 2 additions and 1 deletions
  1. 2
    1
      searx/__init__.py

+ 2
- 1
searx/__init__.py View File

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')