mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
330: Command.normalize() now normalizes all keys, not just keys in params
This commit is contained in:
parent
15b83ab1bf
commit
95abdcd714
@ -304,15 +304,10 @@ class Command(plugable.Plugin):
|
||||
(k, self.params[k].convert(v)) for (k, v) in kw.iteritems()
|
||||
)
|
||||
|
||||
def __normalize_iter(self, kw):
|
||||
for (key, value) in kw.iteritems():
|
||||
if key in self.params:
|
||||
yield (key, self.params[key].normalize(value))
|
||||
else:
|
||||
yield (key, value)
|
||||
|
||||
def normalize(self, **kw):
|
||||
return dict(self.__normalize_iter(kw))
|
||||
return dict(
|
||||
(k, self.params[k].normalize(v)) for (k, v) in kw.iteritems()
|
||||
)
|
||||
|
||||
def __get_default_iter(self, kw):
|
||||
for param in self.params():
|
||||
|
@ -504,7 +504,6 @@ class test_Command(ClassChecker):
|
||||
kw = dict(
|
||||
option0=u'OPTION0',
|
||||
option1=u'OPTION1',
|
||||
option2=u'option2',
|
||||
)
|
||||
norm = dict((k, v.lower()) for (k, v) in kw.items())
|
||||
sub = self.subcls()
|
||||
|
Loading…
Reference in New Issue
Block a user