summaryrefslogtreecommitdiffstats
path: root/module/PluginManager.py
diff options
context:
space:
mode:
authorGravatar mkaay <mkaay@mkaay.de> 2010-09-13 22:49:01 +0200
committerGravatar mkaay <mkaay@mkaay.de> 2010-09-13 22:49:01 +0200
commitd013498b9886e45fc4b725a6009032ba5fe04369 (patch)
treee2cf4506cf26edf84b34e5b3e54f8ab2838b2229 /module/PluginManager.py
parentclean print (diff)
downloadpyload-d013498b9886e45fc4b725a6009032ba5fe04369.tar.xz
better plugin config parsing
Diffstat (limited to 'module/PluginManager.py')
-rw-r--r--module/PluginManager.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/module/PluginManager.py b/module/PluginManager.py
index cc5c7cc53..fe4a94dac 100644
--- a/module/PluginManager.py
+++ b/module/PluginManager.py
@@ -30,6 +30,7 @@ from os.path import abspath
from sys import version_info
from itertools import chain
+from ast import literal_eval
class PluginManager():
@@ -165,7 +166,12 @@ class PluginManager():
config = self.reConfig.findall(content)
if config:
- config = [ [y.strip() for y in x.replace("'","").replace('"',"").replace("\") ","").split(",")] for x in config[0].split(" (\"") if x.strip()]
+ config = literal_eval(config[0].strip().replace("\n", "").replace("\r", ""))
+ if type(config[0]) == tuple:
+ config = [list(x) for x in config]
+ else:
+ config = [list(config)]
+
if folder == "hooks":
config.append( ["load", "bool", "Load on startup", True if name not in ("XMPPInterface", "MultiHome") else False] )