Adding dpkg checks after removal of an application

This commit is contained in:
Alexandre Aubin 2019-02-22 15:00:18 +01:00
parent 53ba867f30
commit e7241394af

View file

@ -880,6 +880,9 @@ def app_install(operation_logger, auth, app, label=None, args=None, no_remove_on
app_ssowatconf(auth)
if packages.dpkg_is_broken():
logger.error(m18n.n("this_action_broke_dpkg"))
if install_retcode == -1:
msg = m18n.n('operation_interrupted') + " " + error_msg
raise YunohostError(msg, raw_msg=True)
@ -962,6 +965,9 @@ def app_remove(operation_logger, auth, app):
hook_remove(app)
app_ssowatconf(auth)
if packages.dpkg_is_broken():
raise YunohostError(m18n.n("this_action_broke_dpkg"))
def app_addaccess(auth, apps, users=[]):
"""