logo

searx

My custom branche(s) on searx, a meta-search engine
commit: 1794f6a4d36cafcc4eb2a64e0145d937bc81bc34
parent: 80331cc8e622cd66ce96d046fd80530ddc852091
Author: Adam Tauber <asciimoo@gmail.com>
Date:   Wed, 19 Jul 2017 21:30:18 +0200

[enh] add "inactive" attribute to engines

This modification allows us to deactivate engines in settings.yml
without commenting them out

Diffstat:

Msearx/engines/__init__.py2++
1 file changed, 2 insertions(+), 0 deletions(-)

diff --git a/searx/engines/__init__.py b/searx/engines/__init__.py @@ -94,6 +94,8 @@ def load_engine(engine_data): logger.debug('Starting background initialization of %s engine', engine_data['name']) threading.Thread(target=engine_init).start() continue + if engine_attr == 'inactive' and getattr(engine, engine_attr) is True: + return None if getattr(engine, engine_attr) is None: logger.error('Missing engine config attribute: "{0}.{1}"' .format(engine.name, engine_attr))