From 56dcc2306ba9e7da2ac72261900adbe0948ad995 Mon Sep 17 00:00:00 2001 From: jesopo Date: Sun, 7 Apr 2019 17:38:52 +0100 Subject: [PATCH] Remove "-" from setting name before getting its value --- modules/set.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/set.py b/modules/set.py index b61d77c9..98c6585c 100644 --- a/modules/set.py +++ b/modules/set.py @@ -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: