Skip to content
Permalink
Browse files

Lowercase the keyword in the set/unset codepaths

The keywords in BaseSvc::cd and Node::cd are forced lowercase,
so don't let uppercase enter the configuration files to avoid
confusion.
  • Loading branch information...
cvaroqui committed Jul 28, 2019
1 parent 1cc1aee commit 03eb23d5e29772d1f462f3daa49dbdd5382895ff
Showing with 4 additions and 1 deletion.
  1. +4 −1 lib/extconfig.py
@@ -79,6 +79,8 @@ def unset_multi(self, kws):
except Exception:
section = "DEFAULT"
option = kw
section = section.lower()
option = option.lower()
try:
del cd[section][option]
deleted += 1
@@ -204,6 +206,7 @@ def set_multi(self, kws, eval=False, validation=True):
if "=" not in kw:
raise ex.excError("malformed kw expression: %s: no '='" % kw)
keyword, value = kw.split("=", 1)
keyword = keyword.lower()
if keyword[-1] == "-":
op = "remove"
keyword = keyword[:-1]
@@ -261,7 +264,7 @@ def set_mono(self, eval=False):
else:
op = "set"
value = self.options.value
keyword = self.options.param
keyword = self.options.param.lower()
index = self.options.index
changes = []
if "." in keyword and "#" not in keyword:

0 comments on commit 03eb23d

Please sign in to comment.
You can’t perform that action at this time.