diff options
author | Walter Purcaro <vuolter@gmail.com> | 2014-10-28 03:59:24 +0100 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2014-10-28 03:59:24 +0100 |
commit | 9d036eee4862537261e82fda6d0afb8d4cb2afe3 (patch) | |
tree | da5ec69d878d1d5f7ae7df2ad129d64855df008e /module | |
parent | [XFSPAccount] Fix missing gmtime import (diff) | |
download | pyload-9d036eee4862537261e82fda6d0afb8d4cb2afe3.tar.xz |
[PluginManager] Fix activated parsing
Diffstat (limited to 'module')
-rw-r--r-- | module/plugins/PluginManager.py | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/module/plugins/PluginManager.py b/module/plugins/PluginManager.py index 5348c070e..3d2b05e75 100644 --- a/module/plugins/PluginManager.py +++ b/module/plugins/PluginManager.py @@ -129,7 +129,7 @@ class PluginManager: if pattern: pattern = pattern[0][1] else: - pattern = "^unmachtable$" + pattern = "^unmatchable$" plugins[name]['pattern'] = pattern @@ -155,13 +155,8 @@ class PluginManager: else: config = [list(config)] - if folder == "hooks": - append = True - for item in config: - if item[0] == "activated": append = False - - # activated flag missing - if append: config.append(["activated", "bool", "Activated", False]) + if folder not in ("accounts", "internal") and not [True for item in config if item[0] == "activated"]: + config.insert(0, ["activated", "bool", "Activated", False if folder == "hooks" else True]) try: self.core.config.addPluginConfig(name, config, desc) |