mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
150: NameSpace.__iter__() now iterates through the names, not the members; added NameSpace.__call__() method which iterates through the members; NameSpace no longer requires members to be Proxy instances; updated unit tests and affected code; cleaned up NameSpace docstrings and switch to epydoc param docstrings
This commit is contained in:
@@ -187,7 +187,7 @@ class cmd(plugable.Plugin):
|
||||
return dict(self.normalize_iter(kw))
|
||||
|
||||
def default_iter(self, kw):
|
||||
for option in self.options:
|
||||
for option in self.options():
|
||||
if option.name not in kw:
|
||||
value = option.default(**kw)
|
||||
if value is not None:
|
||||
@@ -199,7 +199,7 @@ class cmd(plugable.Plugin):
|
||||
|
||||
def validate(self, **kw):
|
||||
self.print_call('validate', kw, 1)
|
||||
for opt in self.options:
|
||||
for opt in self.options():
|
||||
value = kw.get(opt.name, None)
|
||||
if value is None:
|
||||
if opt.required:
|
||||
|
||||
Reference in New Issue
Block a user