mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
180: Fixed a few things in public.py that were broken by the changed NameSpace iter behaiviour
This commit is contained in:
@@ -253,9 +253,11 @@ class obj(plugable.Plugin):
|
|||||||
return plugable.NameSpace(self.__filter(name))
|
return plugable.NameSpace(self.__filter(name))
|
||||||
|
|
||||||
def __filter(self, name):
|
def __filter(self, name):
|
||||||
for i in getattr(self.api, name):
|
namespace = getattr(self.api, name)
|
||||||
if i.obj_name == self.name:
|
assert type(namespace) is plugable.NameSpace
|
||||||
yield i.__clone__('attr_name')
|
for proxy in namespace(): # Like dict.itervalues()
|
||||||
|
if proxy.obj_name == self.name:
|
||||||
|
yield proxy.__clone__('attr_name')
|
||||||
|
|
||||||
|
|
||||||
class attr(plugable.Plugin):
|
class attr(plugable.Plugin):
|
||||||
@@ -299,7 +301,7 @@ class mthd(attr, cmd):
|
|||||||
for proxy in cmd.get_options(self):
|
for proxy in cmd.get_options(self):
|
||||||
yield proxy
|
yield proxy
|
||||||
if self.obj is not None and self.obj.prop is not None:
|
if self.obj is not None and self.obj.prop is not None:
|
||||||
for proxy in self.obj.prop:
|
for proxy in self.obj.prop():
|
||||||
yield proxy
|
yield proxy
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user