Kaynağa Gözat

[fix] fix engine initialization

Adam Tauber 6 yıl önce
ebeveyn
işleme
2f69eaeb2f
1 değiştirilmiş dosya ile 4 ekleme ve 4 silme
  1. 4
    4
      searx/engines/__init__.py

+ 4
- 4
searx/engines/__init__.py Dosyayı Görüntüle

@@ -230,12 +230,12 @@ def load_engines(engine_list):
230 230
 
231 231
 def initialize_engines(engine_list):
232 232
     load_engines(engine_list)
233
-    for engine in engines.items():
233
+    for engine_name, engine in engines.items():
234 234
         if hasattr(engine, 'init'):
235
-            init_fn = getattr(engine, engine_attr)
235
+            init_fn = getattr(engine, 'init')
236 236
 
237 237
             def engine_init():
238 238
                 init_fn()
239
-                logger.debug('%s engine initialized', engine_data['name'])
240
-            logger.debug('Starting background initialization of %s engine', engine_data['name'])
239
+                logger.debug('%s engine initialized', engine_name)
240
+            logger.debug('Starting background initialization of %s engine', engine_name)
241 241
             threading.Thread(target=engine_init).start()