Remove "-" from setting name before getting its value

This commit is contained in:
jesopo 2019-04-07 17:38:52 +01:00
parent 444f37c3da
commit 56dcc2306b

View file

@ -232,9 +232,14 @@ class Module(ModuleManager.BaseModule):
else:
raise ConfigInvalidValue()
else:
unset = False
if setting.startswith("-"):
setting = setting[1:]
unset = True
existing_value = target.get_setting(setting, None)
if not existing_value == None:
if setting.startswith("-"):
if unset:
setting = setting[1:]
target.del_setting(setting)
else: