Browse Source

[fix] set engine.safesearch to False if not defined

Alexandre Flament 10 years ago
parent
commit
6765823c56
1 changed files with 3 additions and 0 deletions
  1. 3 0
      searx/engines/__init__.py

+ 3 - 0
searx/engines/__init__.py

@@ -71,6 +71,9 @@ def load_engine(engine_data):
     if not hasattr(engine, 'language_support'):
     if not hasattr(engine, 'language_support'):
         engine.language_support = True
         engine.language_support = True
 
 
+    if not hasattr(engine, 'safesearch'):
+        engine.safesearch = False
+
     if not hasattr(engine, 'timeout'):
     if not hasattr(engine, 'timeout'):
         engine.timeout = settings['server']['request_timeout']
         engine.timeout = settings['server']['request_timeout']