From 9d036eee4862537261e82fda6d0afb8d4cb2afe3 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 28 Oct 2014 03:59:24 +0100 Subject: [PluginManager] Fix activated parsing --- module/plugins/PluginManager.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'module/plugins/PluginManager.py') 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) -- cgit v1.2.3