Also forbid to app_upgrade if dpkg is broken

This commit is contained in:
Alexandre Aubin 2019-02-22 14:46:53 +01:00
parent 19bd4da104
commit 53ba867f30

View file

@ -564,6 +564,9 @@ def app_upgrade(auth, app=[], url=None, file=None):
url -- Git url to fetch for upgrade
"""
if packages.dpkg_is_broken():
raise YunohostError(m18n.n("dpkg_is_broken"))
from yunohost.hook import hook_add, hook_remove, hook_exec, hook_callback
# Retrieve interface