diff options
Diffstat (limited to 'ipapython')
| -rw-r--r-- | ipapython/install/core.py | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/ipapython/install/core.py b/ipapython/install/core.py index 2f62b8568..f8cf07dc1 100644 --- a/ipapython/install/core.py +++ b/ipapython/install/core.py @@ -531,6 +531,21 @@ class Composite(Configurable): for order, owner_cls, name in result: yield owner_cls, name + def __getattr__(self, name): + for owner_cls, knob_name in self.knobs(): + if knob_name == name: + break + else: + raise AttributeError(name) + + for component in self.__components: + if isinstance(component, owner_cls): + break + else: + raise AttributeError(name) + + return getattr(component, name) + def _reset(self): self.__components = list(self._get_components()) @@ -548,8 +563,7 @@ class Composite(Configurable): try: next(validator) except StopIteration: - if child.done(): - self.__components.remove(child) + pass else: new_validate.append((child, validator)) if not new_validate: @@ -563,7 +577,8 @@ class Composite(Configurable): yield from_(super(Composite, self)._configure()) - execute = [(c, c._executor()) for c in self.__components] + execute = [(c, c._executor()) for c in self.__components + if not c.done()] while True: new_execute = [] for child, executor in execute: |
