From d534973650738c9d1ce23210223256f65ebf3722 Mon Sep 17 00:00:00 2001 From: "jan.karberg" Date: Sat, 16 Dec 2017 14:08:04 +0100 Subject: [PATCH] search only when category is supported by plugin Closes #8053 --- src/searchengine/nova/nova2.py | 4 ++-- src/searchengine/nova3/nova2.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/searchengine/nova/nova2.py b/src/searchengine/nova/nova2.py index 15e4c7f13..fe66c1e6f 100644 --- a/src/searchengine/nova/nova2.py +++ b/src/searchengine/nova/nova2.py @@ -128,8 +128,8 @@ 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" - engine.search(what, cat) + if cat in engine.supported_categories: + engine.search(what, cat) else: engine.search(what) return True diff --git a/src/searchengine/nova3/nova2.py b/src/searchengine/nova3/nova2.py index 78ed5a615..532e058ed 100644 --- a/src/searchengine/nova3/nova2.py +++ b/src/searchengine/nova3/nova2.py @@ -127,8 +127,8 @@ 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" - engine.search(what, cat) + if cat in engine.supported_categories: + engine.search(what, cat) else: engine.search(what)