tools_upgrade: raise a Yunohost error, not a raw exception, when misusing args

This commit is contained in:
Alexandre Aubin 2022-01-29 14:36:10 +01:00
parent 27f8809a2c
commit 49b444e480

View file

@ -453,7 +453,7 @@ def tools_upgrade(operation_logger, target=None):
raise YunohostValidationError("dpkg_lock_not_available")
if target not in ["apps", "system"]:
raise Exception(
raise YunohostValidationError(
"Uhoh ?! tools_upgrade should have 'apps' or 'system' value for argument target"
)