From f86e212dba14f842f77e9516668d25b036e7baf4 Mon Sep 17 00:00:00 2001 From: misnyo Date: Wed, 6 Jan 2016 19:29:51 +0100 Subject: [PATCH] [fix]#485 AttributeError: 'module' object has no attribute 'old_where' --- searx/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/searx/__init__.py b/searx/__init__.py index 76038a44..7b67a394 100644 --- a/searx/__init__.py +++ b/searx/__init__.py @@ -52,7 +52,8 @@ logger = logging.getLogger('searx') # Workaround for openssl versions <1.0.2 # https://github.com/certifi/python-certifi/issues/26 if OPENSSL_VERSION_INFO[0:3] < (1, 0, 2): - environ['REQUESTS_CA_BUNDLE'] = certifi.old_where() + if hasattr(certifi, 'old_where'): + environ['REQUESTS_CA_BUNDLE'] = certifi.old_where() logger.warning('You are using an old openssl version({0}), please upgrade above 1.0.2!'.format(OPENSSL_VERSION)) logger.info('Initialisation done')