Check if app broke something important only if install succeeded (if install fails, this check only matters *after* we remove the app which is already done)

This commit is contained in:
Alexandre Aubin 2020-05-15 04:23:58 +02:00
parent 5850bf610f
commit 413778d2bc

View file

@ -809,8 +809,8 @@ def app_install(operation_logger, app, label=None, args=None, no_remove_on_failu
logger.error(m18n.n("app_install_failed", app=app_id, error=error))
failure_message_with_debug_instructions = operation_logger.error(error)
finally:
# Whatever happened (install success or failure) we check if it broke the system
# and warn the user about it
# If success so far, validate that app didn't break important stuff
if not install_failed:
try:
broke_the_system = False
_assert_system_is_sane_for_app(manifest, "post")