Handle calling 'yunohost' with no args more gracefully

This commit is contained in:
Alexandre Aubin 2023-01-06 17:33:31 +01:00
parent 9fc33eec1a
commit 4c03e16de9

View file

@ -412,6 +412,9 @@ class ActionsMapParser(BaseActionsMapParser):
else:
_p = _p._actions[1]
if tid == []:
return None
raise MoulinetteError(f"Authentication undefined for {tid} ?", raw_msg=True)
def parse_args(self, args, **kwargs):
@ -497,6 +500,9 @@ class Interface:
if output_as and output_as not in ["json", "plain", "none"]:
raise MoulinetteValidationError("invalid_usage")
if not args:
raise MoulinetteValidationError("invalid_usage")
try:
ret = self.actionsmap.process(args, timeout=timeout)
except (KeyboardInterrupt, EOFError):