diff options
| author | David Kupka <dkupka@redhat.com> | 2015-12-16 12:43:13 +0000 |
|---|---|---|
| committer | Martin Basti <mbasti@redhat.com> | 2015-12-21 18:37:32 +0100 |
| commit | 30fbc7e948739f0ee758e01d0ef1a3a0a53984b0 (patch) | |
| tree | 4679160c5640b8e747cab13e5c8f53b3ba823ae7 /ipapython/install | |
| parent | b12ba14e3d07b5f2d8dd50245407da029ae7dc54 (diff) | |
| download | freeipa-30fbc7e948739f0ee758e01d0ef1a3a0a53984b0.tar.gz freeipa-30fbc7e948739f0ee758e01d0ef1a3a0a53984b0.tar.xz freeipa-30fbc7e948739f0ee758e01d0ef1a3a0a53984b0.zip | |
installer: Propagate option values from components instead of copying them.
https://fedorahosted.org/freeipa/ticket/5556
Reviewed-By: Jan Cholasta <jcholast@redhat.com>
Diffstat (limited to 'ipapython/install')
| -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: |
