diff options
Diffstat (limited to 'module/plugins/PluginManager.py')
-rw-r--r-- | module/plugins/PluginManager.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/module/plugins/PluginManager.py b/module/plugins/PluginManager.py index 43e9f9ad4..82702eb7f 100644 --- a/module/plugins/PluginManager.py +++ b/module/plugins/PluginManager.py @@ -149,19 +149,19 @@ class PluginManager: config = self.CONFIG.findall(content) if config: - config = literal_eval(config[0].strip().replace("\n", "").replace("\r", "")) - desc = self.DESC.findall(content) - desc = desc[0][1] if desc else "" + try: + config = literal_eval(config[0].strip().replace("\n", "").replace("\r", "")) + desc = self.DESC.findall(content) + desc = desc[0][1] if desc else "" - if type(config[0]) == tuple: - config = [list(x) for x in config] - else: - config = [list(config)] + if type(config[0]) == tuple: + config = [list(x) for x in config] + else: + config = [list(config)] - 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]) + 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) except: self.log.error("Invalid config in %s: %s" % (name, config)) |