Browse Source

Merge pull request #8054 from hannsen/master

search only when category is supported by plugin
adaptive-webui-19844
sledgehammer999 7 years ago committed by GitHub
parent
commit
8a590c7472
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/searchengine/nova/nova2.py
  2. 2
      src/searchengine/nova3/nova2.py

2
src/searchengine/nova/nova2.py

@ -128,7 +128,7 @@ def run_search(engine_list): @@ -128,7 +128,7 @@ def run_search(engine_list):
engine = engine()
#avoid exceptions due to invalid category
if hasattr(engine, 'supported_categories'):
cat = cat if cat in engine.supported_categories else "all"
if cat in engine.supported_categories:
engine.search(what, cat)
else:
engine.search(what)

2
src/searchengine/nova3/nova2.py

@ -127,7 +127,7 @@ def run_search(engine_list): @@ -127,7 +127,7 @@ def run_search(engine_list):
engine = engine()
#avoid exceptions due to invalid category
if hasattr(engine, 'supported_categories'):
cat = cat if cat in engine.supported_categories else "all"
if cat in engine.supported_categories:
engine.search(what, cat)
else:
engine.search(what)

Loading…
Cancel
Save