summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Tauber <asciimoo@gmail.com>2018-02-17 14:30:06 +0100
committerAdam Tauber <asciimoo@gmail.com>2018-02-17 14:30:06 +0100
commit2f69eaeb2fb76a14d9c3f2a67a9e404b066049ba (patch)
tree82f47b00a27b0fab6c7f3b75df4e2c51582d452d
parent360f8fab97a364e2f5e7fc8c5329cccb1ad5654a (diff)
downloadsearxng-2f69eaeb2fb76a14d9c3f2a67a9e404b066049ba.tar.gz
searxng-2f69eaeb2fb76a14d9c3f2a67a9e404b066049ba.zip
[fix] fix engine initialization
-rw-r--r--searx/engines/__init__.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/searx/engines/__init__.py b/searx/engines/__init__.py
index b4479157b..af3cf8110 100644
--- a/searx/engines/__init__.py
+++ b/searx/engines/__init__.py
@@ -230,12 +230,12 @@ def load_engines(engine_list):
def initialize_engines(engine_list):
load_engines(engine_list)
- for engine in engines.items():
+ for engine_name, engine in engines.items():
if hasattr(engine, 'init'):
- init_fn = getattr(engine, engine_attr)
+ init_fn = getattr(engine, 'init')
def engine_init():
init_fn()
- logger.debug('%s engine initialized', engine_data['name'])
- logger.debug('Starting background initialization of %s engine', engine_data['name'])
+ logger.debug('%s engine initialized', engine_name)
+ logger.debug('Starting background initialization of %s engine', engine_name)
threading.Thread(target=engine_init).start()