Index: pluginconf.py ================================================================== --- pluginconf.py +++ pluginconf.py @@ -475,26 +475,29 @@ def add_plugin_defaults(conf_options, conf_plugins, meta={}, module=""): # Option defaults, if not yet defined for opt in meta.get("config", []): if "name" in opt and "value" in opt: - if opt["name"] not in conf_options: + _value = opt.get("value", "") + _name = opt.get("name") + _type = opt.get("type") + if _name not in conf_options: # typemap "bool" and "int" here - if opt["type"] in ("bool", "boolean"): - val = opt["value"].lower() in ("1", "true", "yes", "on") - elif opt["type"] in ("int", "integer", "numeric"): - val = int(opt["value"]) - elif opt["type"] in ("array", "table", "list"): - val = [ opt["value"].split(",") ] - elif opt["type"] in ("dict"): - val = dict(opt["value"].split(",")) + if _type in ("bool", "boolean"): + val = _value.lower() in ("1", "true", "yes", "on") + elif _type in ("int", "integer", "numeric"): + val = int(_value) + elif _type in ("array", "table", "list"): + val = [ re.split("\s*[,;]\s*", s.strip()) for s in re.split("\s[|]\s*", _value) ] + elif _type in ("dict"): + val = dict([ re.split("\s*(?:=>+|==*|-+>|:=+)\s*", s.strip()) for s in re.split("\s*[|;,]\s*", _value) ]) else: - val = str(opt["value"]) - conf_options[opt["name"]] = val + val = str(_value) + conf_options[_name] = val # Initial plugin activation status if module and module not in conf_plugins: conf_plugins[module] = meta.get("priority") in ( "core", "builtin", "always", "default", "standard" )