mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Make Continuous installer continuous only during execution phase
`common.Continuous` class is a basis for uninstallers, which should execute all the steps regardless of occuring errors. However, we would like the installer to raise exceptions and return non-zero exit code during validation phase when some preconditions are not met. Add a separate exception handler which catches exceptions and logs them as errors during execution phase only. https://fedorahosted.org/freeipa/ticket/5725 Reviewed-By: Petr Spacek <pspacek@redhat.com>
This commit is contained in:
parent
e306e8f06d
commit
e45bd59b44
@ -86,9 +86,9 @@ class Interactive(core.Configurable):
|
||||
|
||||
|
||||
class Continuous(core.Configurable):
|
||||
def _handle_exception(self, exc_info):
|
||||
def _handle_execute_exception(self, exc_info):
|
||||
try:
|
||||
super(Continuous, self)._handle_exception(exc_info)
|
||||
super(Continuous, self)._handle_execute_exception(exc_info)
|
||||
except BaseException as e:
|
||||
self.log.debug(traceback.format_exc())
|
||||
if isinstance(e, Exception):
|
||||
|
@ -375,11 +375,8 @@ class Configurable(six.with_metaclass(abc.ABCMeta, object)):
|
||||
try:
|
||||
exc_handler(exc_info)
|
||||
except BaseException:
|
||||
raise
|
||||
else:
|
||||
break
|
||||
finally:
|
||||
self.__transition(running_state, _FAILED)
|
||||
raise
|
||||
|
||||
if self.__state != running_state:
|
||||
break
|
||||
|
Loading…
Reference in New Issue
Block a user