prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  AttributeError: 'module' object has no attribute 'old_where'
  I updated my searx instance today, and got the following error:
  
  ```
  Traceback (most recent call last):
    File "/usr/local/searx/searx/__init__.py", line 55, in <module>
      environ['REQUESTS_CA_BUNDLE'] = certifi.old_where()
  AttributeError: 'module' object has no attribute 'old_where'
  ```
  
  I updated the dependencies with `pip install --upgrade -r requirements.txt` before running searx.
  
  
  </issue>
  <code>
  [start of searx/__init__.py]
  1 '''
  2 searx is free software: you can redistribute it and/or modify
  3 it under the terms of the GNU Affero General Public License as published by
  4 the Free Software Foundation, either version 3 of the License, or
  5 (at your option) any later version.
  6 
  7 searx is distributed in the hope that it will be useful,
  8 but WITHOUT ANY WARRANTY; without even the implied warranty of
  9 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  10 GNU Affero General Public License for more details.
  11 
  12 You should have received a copy of the GNU Affero General Public License
  13 along with searx. If not, see < http://www.gnu.org/licenses/ >.
  14 
  15 (C) 2013- by Adam Tauber, <asciimoo@gmail.com>
  16 '''
  17 
  18 import certifi
  19 import logging
  20 from os import environ
  21 from os.path import realpath, dirname, join, abspath
  22 from ssl import OPENSSL_VERSION_INFO, OPENSSL_VERSION
  23 try:
  24     from yaml import load
  25 except:
  26     from sys import exit, stderr
  27     stderr.write('[E] install pyyaml\n')
  28     exit(2)
  29 
  30 searx_dir = abspath(dirname(__file__))
  31 engine_dir = dirname(realpath(__file__))
  32 
  33 # if possible set path to settings using the
  34 # enviroment variable SEARX_SETTINGS_PATH
  35 if 'SEARX_SETTINGS_PATH' in environ:
  36     settings_path = environ['SEARX_SETTINGS_PATH']
  37 # otherwise using default path
  38 else:
  39     settings_path = join(searx_dir, 'settings.yml')
  40 
  41 # load settings
  42 with open(settings_path) as settings_yaml:
  43     settings = load(settings_yaml)
  44 
  45 if settings.get('general', {}).get('debug'):
  46     logging.basicConfig(level=logging.DEBUG)
  47 else:
  48     logging.basicConfig(level=logging.WARNING)
  49 
  50 logger = logging.getLogger('searx')
  51 
  52 # Workaround for openssl versions <1.0.2
  53 # https://github.com/certifi/python-certifi/issues/26
  54 if OPENSSL_VERSION_INFO[0:3] < (1, 0, 2):
  55     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 
  58 logger.info('Initialisation done')
  59
  [end of searx/__init__.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/searx/__init__.py b/searx/__init__.py
  --- a/searx/__init__.py
  +++ b/searx/__init__.py
  @@ -52,7 +52,8 @@
   # 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')
  
verification_info: {"golden_diff": "diff --git a/searx/__init__.py b/searx/__init__.py\n--- a/searx/__init__.py\n+++ b/searx/__init__.py\n@@ -52,7 +52,8 @@\n # Workaround for openssl versions <1.0.2\n # https://github.com/certifi/python-certifi/issues/26\n if OPENSSL_VERSION_INFO[0:3] < (1, 0, 2):\n-    environ['REQUESTS_CA_BUNDLE'] = certifi.old_where()\n+    if hasattr(certifi, 'old_where'):\n+        environ['REQUESTS_CA_BUNDLE'] = certifi.old_where()\n     logger.warning('You are using an old openssl version({0}), please upgrade above 1.0.2!'.format(OPENSSL_VERSION))\n \n logger.info('Initialisation done')\n", "issue": "AttributeError: 'module' object has no attribute 'old_where'\nI updated my searx instance today, and got the following error:\n\n```\nTraceback (most recent call last):\n  File \"/usr/local/searx/searx/__init__.py\", line 55, in <module>\n    environ['REQUESTS_CA_BUNDLE'] = certifi.old_where()\nAttributeError: 'module' object has no attribute 'old_where'\n```\n\nI updated the dependencies with `pip install --upgrade -r requirements.txt` before running searx.\n\n", "before_files": [{"content": "'''\nsearx is free software: you can redistribute it and/or modify\nit under the terms of the GNU Affero General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nsearx is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Affero General Public License for more details.\n\nYou should have received a copy of the GNU Affero General Public License\nalong with searx. If not, see < http://www.gnu.org/licenses/ >.\n\n(C) 2013- by Adam Tauber, <asciimoo@gmail.com>\n'''\n\nimport certifi\nimport logging\nfrom os import environ\nfrom os.path import realpath, dirname, join, abspath\nfrom ssl import OPENSSL_VERSION_INFO, OPENSSL_VERSION\ntry:\n    from yaml import load\nexcept:\n    from sys import exit, stderr\n    stderr.write('[E] install pyyaml\\n')\n    exit(2)\n\nsearx_dir = abspath(dirname(__file__))\nengine_dir = dirname(realpath(__file__))\n\n# if possible set path to settings using the\n# enviroment variable SEARX_SETTINGS_PATH\nif 'SEARX_SETTINGS_PATH' in environ:\n    settings_path = environ['SEARX_SETTINGS_PATH']\n# otherwise using default path\nelse:\n    settings_path = join(searx_dir, 'settings.yml')\n\n# load settings\nwith open(settings_path) as settings_yaml:\n    settings = load(settings_yaml)\n\nif settings.get('general', {}).get('debug'):\n    logging.basicConfig(level=logging.DEBUG)\nelse:\n    logging.basicConfig(level=logging.WARNING)\n\nlogger = logging.getLogger('searx')\n\n# Workaround for openssl versions <1.0.2\n# https://github.com/certifi/python-certifi/issues/26\nif OPENSSL_VERSION_INFO[0:3] < (1, 0, 2):\n    environ['REQUESTS_CA_BUNDLE'] = certifi.old_where()\n    logger.warning('You are using an old openssl version({0}), please upgrade above 1.0.2!'.format(OPENSSL_VERSION))\n\nlogger.info('Initialisation done')\n", "path": "searx/__init__.py"}]}