From 09e7353307c918a1c08513114faaf691d271a9b7 Mon Sep 17 00:00:00 2001 From: asciimoo Date: Sat, 26 Oct 2013 18:44:58 +0200 Subject: [PATCH] [enh] config checks --- searx/engines/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/searx/engines/__init__.py b/searx/engines/__init__.py index c7cf6c059..010c753e9 100644 --- a/searx/engines/__init__.py +++ b/searx/engines/__init__.py @@ -45,6 +45,10 @@ def load_module(filename): module.name = modname return module +if not engines_config.sections(): + print '[E] Error no engines found. Edit your engines.cfg' + exit(2) + for section in engines_config.sections(): engine_data = engines_config.options(section) engine = load_module(engines_config.get(section, 'engine')+'.py')