mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-22 08:27:24 -06:00
Fix defects found by lgtm.com
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user