Fix defects found by lgtm.com

This commit is contained in:
Chocobo1
2018-11-02 23:55:18 +08:00
parent 53f9d031c9
commit d52c6230e9
7 changed files with 19 additions and 19 deletions

View File

@@ -1,4 +1,4 @@
#VERSION: 1.42
#VERSION: 1.43
# Author:
# Fabien Devaux <fab AT gnux DOT info>
@@ -77,7 +77,7 @@ def initialize_engines():
# bind class name
globals()[engi] = getattr(engine_module, engi)
supported_engines.append(engi)
except:
except Exception:
pass
return supported_engines
@@ -94,7 +94,7 @@ def engines_to_xml(supported_engines):
if hasattr(search_engine, "supported_categories"):
supported_categories = " ".join((key
for key in search_engine.supported_categories.keys()
if key is not "all"))
if key != "all"))
yield "".join((tab, "<", short_name, ">\n",
tab, tab, "<name>", search_engine.name, "</name>\n",
@@ -138,7 +138,7 @@ def run_search(engine_list):
else:
engine.search(what)
return True
except:
except Exception:
return False