summaryrefslogtreecommitdiffstats
path: root/pyload/manager/Plugin.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-04-20 21:38:42 +0200
committerGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-04-20 23:01:29 +0200
commit9327b55e147d95b5865f23788f980c7268ea03e3 (patch)
tree0260b6f90b9e6fab5548e29e44b6d66f3334c98e /pyload/manager/Plugin.py
parentPEP-8, Python Zen, refactor and reduce code (part 9 in master module/network) (diff)
downloadpyload-9327b55e147d95b5865f23788f980c7268ea03e3.tar.xz
Spare code cosmetics (7)
Diffstat (limited to 'pyload/manager/Plugin.py')
-rw-r--r--pyload/manager/Plugin.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/pyload/manager/Plugin.py b/pyload/manager/Plugin.py
index a081a643e..9417a6935 100644
--- a/pyload/manager/Plugin.py
+++ b/pyload/manager/Plugin.py
@@ -126,7 +126,7 @@ class PluginManager(object):
module = f.replace(".pyc", "").replace(".py", "")
# the plugin is loaded from user directory
- plugins[name]['user'] = True if rootplugins else False
+ plugins[name]['user'] = bool(rootplugins)
plugins[name]['name'] = module
pattern = self.PATTERN.findall(content)
@@ -162,7 +162,7 @@ class PluginManager(object):
config = [list(config)]
if folder not in ("account", "internal") and not [True for item in config if item[0] == "activated"]:
- config.insert(0, ["activated", "bool", "Activated", False if folder in ("addon", "hook") else True])
+ config.insert(0, ["activated", "bool", "Activated", not folder in ("addon", "hook")])
self.core.config.addPluginConfig("%s_%s" % (name, folder), config, desc)
except Exception:
@@ -398,4 +398,4 @@ class PluginManager(object):
def reloadPlugin(self, type_plugin):
""" reload and reindex ONE plugin """
- return True if self.reloadPlugins(type_plugin) else False
+ return bool(self.reloadPlugins(type_plugin))