summaryrefslogtreecommitdiff
path: root/searx/engines/__init__.py
diff options
context:
space:
mode:
authorAdam Tauber <asciimoo@gmail.com>2014-10-19 12:41:04 +0200
committerAdam Tauber <asciimoo@gmail.com>2014-10-19 12:41:04 +0200
commit5740cfbf1cb468af74d0e7e1c9358ce702eb4f59 (patch)
treec93752a16cd24ce1b72e0f0520ed04d0e0f25c9e /searx/engines/__init__.py
parentb0fd71b7b3463864e6c60156610d383af2ac9709 (diff)
downloadsearxng-5740cfbf1cb468af74d0e7e1c9358ce702eb4f59.tar.gz
searxng-5740cfbf1cb468af74d0e7e1c9358ce702eb4f59.zip
[fix] pep8 part II.
Diffstat (limited to 'searx/engines/__init__.py')
-rw-r--r--searx/engines/__init__.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/searx/engines/__init__.py b/searx/engines/__init__.py
index e63dd7189..80356a8cd 100644
--- a/searx/engines/__init__.py
+++ b/searx/engines/__init__.py
@@ -41,7 +41,7 @@ def load_module(filename):
module.name = modname
return module
-if not 'engines' in settings or not settings['engines']:
+if 'engines' not in settings or not settings['engines']:
print '[E] Error no engines found. Edit your settings.yml'
exit(2)
@@ -68,15 +68,15 @@ for engine_data in settings['engines']:
engine.categories = ['general']
if not hasattr(engine, 'language_support'):
- #engine.language_support = False
+ # engine.language_support = False
engine.language_support = True
if not hasattr(engine, 'timeout'):
- #engine.language_support = False
+ # engine.language_support = False
engine.timeout = settings['server']['request_timeout']
if not hasattr(engine, 'shortcut'):
- #engine.shortcut = '''
+ # engine.shortcut = '''
engine.shortcut = ''
# checking required variables
@@ -161,7 +161,8 @@ def get_engines_stats():
for engine in scores_per_result:
if max_score_per_result:
- engine['percentage'] = int(engine['avg'] / max_score_per_result * 100)
+ engine['percentage'] = int(engine['avg']
+ / max_score_per_result * 100)
else:
engine['percentage'] = 0