Simplify that indentation madness

This commit is contained in:
Alexandre Aubin 2019-09-26 16:34:14 +02:00
parent 9331f44b34
commit ccc49a2b28

View file

@ -944,7 +944,11 @@ def app_install(operation_logger, app, label=None, args=None, no_remove_on_failu
# If the install failed or broke the system, we remove it # If the install failed or broke the system, we remove it
if install_failed or broke_the_system: if install_failed or broke_the_system:
if not no_remove_on_failure:
# This option is meant for packagers to debug their apps more easily
if no_remove_on_failure:
raise YunohostError("The installation of %s failed, but was not cleaned up as requested by --no-remove-on-failure." % app_id, raw_msg=True)
# Setup environment for remove script # Setup environment for remove script
env_dict_remove = {} env_dict_remove = {}
env_dict_remove["YNH_APP_ID"] = app_id env_dict_remove["YNH_APP_ID"] = app_id